ANSI-ISO STANDARD PASCAL COMPILERS AVAILABLE


This page contains a list of known compilers, either freeware or paidware, that comply with either the ISO or ANSI standards for Pascal (note that ALL of the ISO and ANSI Pascal standards specify compliance with the same base standard language). I have used two simple criteria to determine what gets listed on this page. First, the compiler must be currently available, either for sale or download. Second, it must be known to comply with the either the ISO or ANSI standard (or a non-American standard that specifically references the ISO standard, as the ANSI standard does). Since I don't have always have the means to determine that, I will take the maker's word that they meet the standard.

Compilers can always be found to have problems complying with the standard. The maker may not know that their compiler does not meet some part of the standard (nobody is perfect, and there is no "absolute" compliance test). I don't personally think that any compiler maker that claims to meet the standard should be pronounced "nonstandard" as long as they state their intent to meet the standard, and correct any compliance problems. The only way I would feel justified in such a pronouncement is if the maker has stated that they have no intention of correcting the compliance problem, or have not corrected a known problem in a timely manner (say, the problem has existed for a year or more).


ISO 7185 Compilers/interpreters

[S] GPC, the free software Pascal compiler based on GCC. GPC is a project to implement a Pascal compiler front end to the GCC compiler project. The reason that this is a good idea, is that it uses all the existing GCC tools, and in fact, will work on any computer the GCC compiler works on, which is huge and growing. It can also integrate to all the fantastic libraries and back ends of GCC. GPC obeys ISO 7185, and the authors are attempting to integrate a large number of features from the Extended Pascal standard, ISO 10206.

Prospero Extended Pascal 32-bit Edition (full Extended Standard Pascal). Prospero has a long history with Pascal on the IBM PC platform, supporting DOS, Windows, and OS/2 implementations. In their latest compiler, they have implemented full 32 bit code generation, and support full graphical programming under the OS/2 2.x and 3.x environments. Prospero is the first and currently the ONLY maker to fully implement the Extended Pascal standard (not just the basic standard).

Compaq Pascal for the ALPHA CPU. Compaq (formerly DEC) has created some of the highest performing compilers for standard Pascal since the VAX series computers, and continues the tradition into the ALPHA series computers. DEC compilers are known for being "industrial strength".

[S] Irie Tools Pascal. A 32 bit ISO 7185 Standard Pascal, with a full IDE under Windows. Interprets code built for an execution machine (not native code). Runs on Windows, FreeBSD, Solaris/x86, and Solaris/Sparc.

Pascal-XT from Fujitsu/Siemens. Apparently for the IBM 390 and RS2000 series computers, this site specifically states ISO 7185 compatibility.

[S] Dr. Pascal. Dr. Pascal runs on IBM-PC DOS, Macintosh (pre OS X), from Visible Software. Dr. Pascal is a full IDE invironment for DOS/Mac, but is interpretive only. Visible also makes a compiler, for DOS only.. This is the interpreter used for Douglas Cooper's Oh! Pascal! book.

[S] IP Pascal. IP Pascal is a project to create an extended language, with a porting platform, that runs on all available machines at high efficiency. Think Java with a high optimizing compiler. It is ISO 7185 compatible, and fully compiled. The current implementation is on Windows and Linux, with Mac OS X and Sun Solaris planned shortly. A demo is available on the web site.

[S] P5. P5 is an open source compiler/interpreter that was originally part of the ETH Zurich Pascal porting kit for creators of Pascal compilers. It is well known (it was the basis for UCSD Pascal, the DEC implementation and many others). It is ISO 7185 compatible both in the language it compiles and the language it is written in, free, and the source is available on this site.

[S] - Indicates the compiler/processor has been verified to ISO 7185 status by me personally.

Disclosure note: IP Pascal is made by the company of this site's author, Scott A. Moore. I don't advertise on the Standard Pascal site, and I have placed mention of our compiler last in the above list. In addition, I have offered, and renew the offer, for any of the above compiler makers to write their own descriptions of their compilers to eliminate any possibility of bias on my part.


ISO 7185 Verification

As part of my continuing activities to promote the ISO 7185 Standard, I have been personally verifying some of the compilers above.

I will verify, free of charge, anyone's compiler who wishes to have it verified. All I ask is that the compiler, and perhaps the computer used to run it, be made available to me here in the San Francisco Bay area where I can access it. I only test for compliance to the ISO 7185 standard, and will not keep any of the programs, documentation or other materials from the test. You only need to agree that I will list a POSITIVE test result (I do not discuss failures, implementations that do not qualify as being ISO 7185) on my ANSI-ISO Pascal web site, as well as any exceptions to the ISO 7185 standard as required in section 5.1 of the ISO 7185 standard. I regret that I cannot purchase products or otherwise provide renumerations for these products. It is not practical for me to purchase every compiler existing for test purposes, nor every computer system that these compiler systems run on.

For details on the nature of the test, see the section below.


ISO 7185 Verified compilers

Please note: There is nothing implied by a compiler/processor not appearing in this section. Submission of a compiler/processor to my ISO 7185 tests is entirely voluntary and may not have occurred for any number of reasons. Further, I am not a recognized ISO 7185 standard test facility, nor do I reveal all of the nature of the tests I perform. Finally, I do not warrant the results of any of my test work or hold any responsibility for the fitness of any product tested here.


GPC

Last verified:                          November 25, 2007

ISO 7185 full standard test:    One failure (see explanation)

Version:                                 gpc version 20051116, based on gcc-3.4.4

Pascal-s compile/run:             Pass

 

Implementation first order details:

 

Processor run on:                      AMD Athlon 3200+

Bits:                                          32

Value of maxint:                         2147483647

Default integer field width:          11 characters

Default real format field width:    29 characters

Default boolean field width:         6

Default character field width:       1 character.

Implementation character set:      ASCII

 

My comments:

 

1. Test failure on ISO 7185 section 6.4.3.5, specifically the requirement that each line consist of a sequence of characters terminated by the eoln sequence. When a temporary (unnamed) file was output with an incomplete last line, and subsequently read back, the last eoln was found to be missing. The ISO 7185 standard requires that such missing eolns be automatically inserted. On GPC, this behavior is enabled by the --standard-pascal option, but was not usable on the version tested because it incorrectly flagged valid ISO 7185 constructs as errors in the source.

 

2. The date of the version tested is fairly old (2005, above). The test was done using a "prebuilt" version of GPC (their terminology) from the GPC web site. The maintainers have recommended using a newer build of the source, which I didn't do for the following reasons. First, there is considerable effort involved with building GPC from source, and GPC is highly cross coupled to building GCC, itself a significant undertaking. Second, I don't believe most users would build their own new version, for similar reasons. Finally, the "current version" involves building from the current source with patches. It would be next to impossible for me to accurately specify such a "version" of the software.

 

3. The GPC documentation inaccurately states that the flag "--standard-pascal" is all that is needed to insure ISO 7185 level 0 compliance. In fact, this switch was found broken at the time of testing, and caused several normal ISO 7185 features to be incorrectly flagged as errors/warnings. In addition, the flag --field-widths was found to be needed. Finally, the version tested output several warnings with no relationship to Pascal (in fact, they were C language warnings). The net command syntax required to accurately compile ISO 7185 Pascal using GPC is:

 

    gpc --field-widths -Wno-warnings -o <program> <program>.pas

 

Where <program> is the name of the Pascal program to be compiled.

 

GPC originator comments:

 

<Not supplied>


IRIE TOOLS PASCAL

Last verified:                           June 11, 2005

ISO 7185 full standard test:    Two failures, see notes below

Version:                                  Irie Pascal 2.6 (Windows Edition)

Pascal-s compile/run:              Failed, see notes below

 

Implementation first order details:

 

Processor run on:                       AMD Athlon 64 3200+

Bits:                                           32

Value of maxint:                          2147483647

Default integer field width:           8 characters

Default real format field width:     9 characters

Default boolean field width:         8 characters.

Default character field width:       1 character.

Implementation character set:      ASCII

 

The following exceptions to the ISO 7185 standard were provided in the accompanying documentation (as the ISO 7185 standard requires). These are features that may prevent an ISO 7185 program from running if they are used. The following exceptions were copied from the makers documentation.

 

1. End-of-line char. Standard Pascal requires that end-of-line characters read from text files be converted to spaces. For example given:

   read(f, c)

where f is a text file at end-of-line and c is a character variable then according to Standard Pascal, after the read above, c should contain a space character rather than an end-of-line character. Irie Pascal does not convert end-of-line characters read from text files, so in the example above c will contain an end-of-line character (i.e. a linefeed character, chr(10)).

2. Termination of all lines in text files. Standard Pascal requires that all lines in text files (except possibly the line that is currently being written) should be terminated by an end-of-line. In effect this means that after a text file is closed the last line must be terminated by an end-of-line. Irie Pascal does not automatically terminate the last line in a text file.

3. new(p, cl..cN). Standard Pascal requires support for a form of the required procedure new as follows:

   new(p, c1..cN)

where p is a pointer to a variant record and c1 thru cN are case constants which correspond to the variants in p^. Irie Pascal does not currently support this form of new.

4. Dispose(q, k1..kM). Standard Pascal requires support for a form of the required procedure dispose as follows:

   dispose(q, k1..kM)

where q is a pointer to a variant record and k1 thru kM are case constants which correspond to the variants in q^. Irie Pascal does not currently support this form of dispose.

5. Carriage returns. Standard Pascal requires that all characters written to a file should appear when the file is read (the exception to this is that implementations are allowed to designate a set of characters as prohibited from text files and treat these characters specially). The Windows, DOS, and OS/2 editions of Irie Pascal do not comply fully with this requirement, since with these editions carriage-return characters do not appear when individual characters are read from text files. This treatment of carriage-return characters is intended to convert carriage-return/line-feed pairs (that are used as end-of-line markers in some text files) into a single end-of-line character (i.e. a line-feed chr(10)).

 

My comments:

 

1. Test failure on ISO 7185 section 6.4.3.5, specifically the requirement that each line consist of a sequence of characters terminated by the eoln sequence. When a temporary (unnamed) file was output with an incomplete last line, and subsequently read back, the last eoln was found to be missing.

2. Test failure on ISO 7185 section 6.4.3.5, specifically the requirement that eoln be read as a space. When an eoln was read, the result was the "line feed" character $10.

2. The ISO 7185 Version of Pascal-s did not compile or run. The maker indicated that a forthcoming change to the compiler would solve the compile problem, which was due to the compilers treatment of the symbol "object" as a reserved keyword, even with the "-E-" flag enabled (disable extentions). However, it was determined that Pascal-s will not run even after a successful compile due to differences between ISO 7185 eoln behavior and IRIE Tools Pascal due to (1) and (2) of this section.

 

IRIE Tools Pascal originator comments:

 

<Not supplied>


DR PASCAL

Last verified:                          June 11, 2005

ISO 7185 full standard test:    pass (with one note)

Version:                                 Dr. Pascal 2.20 (DOS window under Windows/XP)

Pascal-s compile/run:             fail (see notes)

 

Implementation first order details:

 

Processor run on:                       AMD Athlon 64 3200+

Bits:                                           16

Value of maxint:                          32767

Default integer field width:           7 characters

Default real format field width:     13 characters

Default boolean field width:         5 characters.

Default character field width:       1 character.

Implementation character set:      ASCII

 

My comments:

 

1. The compiler is limited to 64kb, and cannot run Pascal-s, so this phase of the test was skipped.

 

2. The default output width for boolean does not appear to match the standard. False is output in 5 spaces, true in 4. The standard requires that they both be the same, usually 5 spaces (minimum).

 

Dr. Pascal originator comments:

 

1.  Regarding comment 2 above, our use of default widths for boolean  values is consistent with two reference books on the Pascal Standard (Cooper, Mickel and  Miner), our reading of ISO 7185. Also, Dr. Pascal has passed the official Pascal Validation Suite from BSI.  However, we agree  that default Boolean writes are inconsistent with one plausible reading of ISO 7185.  Given the variation among sources, we do not consider it a deficiency and   elect not to change this feature of Dr. Pascal.

2. Dr. Pascal tests for many runtime errors specified as optional in  ISO 7185,  for example access of undefined value, access to a pointer after a copy of that  pointer was disposed, and many others.  This is a quality indicator of Dr. Pascal not tested  for here.


IP PASCAL

Last verified:                          May 01, 2005

ISO 7185 full standard test:    pass

Version:                                 IP Pascal 1.0 (Windows XP)

Pascal-s compile/run:             pass

 

Implementation first order details:

 

Processor run on:                       AMD Athlon 64 3200+

Bits:                                           32

Value of maxint:                          2147483647

Default integer field width:           11 characters

Default real format field width:     22 characters

Default boolean field width:         5 characters.

Default character field width:       1 character.

Implementation character set:      ASCII

 

My comments:

 

1. IP Pascal is my company's compiler. Therefore I have placed it last in this list.

 

IP Pascal originator comments:

 

<Not supplied>


P5

Last verified:                          April 01, 2008

ISO 7185 full standard test:    pass

Version:                                 0.1 (beta)(Windows XP)

Pascal-s compile/run:             Not done

 

Implementation first order details:

 

Processor run on:                       AMD Athlon 64 3200+

Bits:                                           32

Value of maxint:                          2147483647

Default integer field width:           11 characters

Default real format field width:     22 characters

Default boolean field width:         5 characters.

Default character field width:       1 character.

Implementation character set:      ASCII

 

My comments:

 

1. This code is beta, so capacity tests, such as pascal-s were not run.

2. The compiler/interpreter picks up the default characteristics of its host compiler, such as the default integer field width, maxint, etc., so it will matter which host was used to compile it. It was tested using IP Pascal on Windows/XP.

 

P5 originator comments:

 

<Not supplied>


ISO 7185 Testing Details

 

Why another ISO 7185 test ?

 

There was only one general ISO 7185 test in existence, the BSO (British Standards Organization) test. It has been taken off the market by the BSO, and they have no plans to either offer it again, or release it to public domain. There is an older copy of that test in the PUG newsletters, found elsewhere on this site. However, the material there is not straightforward to OCR (Optical Character Recognition), so the ability (or inability) to make this test available will be revisited in the future.

 

I have my own compliance test for ISO 7185 which was created to test my own compiler (IP Pascal). Details of that are below. This is a "feature" test, designed to exercise each feature of the ISO 7185 standard. It is NOT a stress test. For example, it does not check how many procedures can be nested, or the total size of program that can be compiled, etc.

 

The following procedure is used to verify ISO 7185 compliance by me:

 

1. The ISO 7185 compliance program is compiled and run. This is then checked for correctness.

2. The ISO 7185 compliant program Pascal-s is compiled and run, using simple Pascal programs written in the Pascal-s language subset. Pascal-s tends to use most of the language, and constitutes a non-trivial program.

3. A version of the ISO 7185 compliance suite that has been cut down to the Pascal-s subset is run on the Pascal-s compiled by the compiler under test.

 

So ultimately, the compiler is run against the compliance test, then used to compile and run Pascal-s, then that itself is tested with a version of the compliance test. This is a fairly complete shakeout of the compiler,. and confidence can be high the system is ISO 7185 compliant and stable after that.


The IP Pascal ISO 7185 Compliance Test

 

The test is a pretty standard compiler test. It is ISO 7185 simply because I separated the ISO 7185 material from the extended tests for IP Pascal. It originated in about 1992 for the purpose of verifying the Windows NT version of IP Pascal, which actually started as a DOS/386 extender implementation, since Windows NT was not yet available.

The test performs and prints a given operation, then prints a ' s/b xxx' text line to allow for easy checking. The check is done manually by reading the output, but can be done automatically for identical formatting by saving the output in a file, and comparing against a reference file. To this end, the tests specifically specify output formats where possible.

The file was originally run against SVS Pascal, which failed several of the tests. The fact that SVS shared no extensions in common with IP Pascal probably had a great deal to do with the ISO 7185 section of the tests, since that is all that the languages had in common.

I don't make this test freely available because that would serve no purpose. Other programs, notably Pascal-s, have been put forth as examples of ISO 7185 Pascal programs that perspective compilers may run (or fail to run). The only result has been the modification of those programs to fit a particular Pascal dielect, followed by many uninformed people claiming that as proof that their compiler is in fact ISO 7185 standard. As it is, I have both the test, and the means to apply it.

Since I offered this testing service to other ISO 7185 compiler vendors, the response has been excellent.


For more information contact: Scott A. Moore samiam@moorecad.com