Pascal: Difference between revisions
(46 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Image:BlasiePascal.jpg|thumb|right|The Pascal programming language was named after French philosopher and mathematician | [[Image:BlasiePascal.jpg|thumb|right|The Pascal programming language was named after French philosopher and mathematician Blaise Pascal (1623-1662).]] | ||
Structured procedural language introduced by Niklaus Wirth in 1970 although it had been used internally by [[ETH]] as early as 1968, based partially on his earlier | Structured procedural language introduced by Niklaus Wirth in 1970 although it had been used internally by [[ETH]] as early as 1968, based partially on his earlier [[ALGOL W]] language that had been proposed in 1966 to the Algol committee but rejected in favour of the much more complex [[ALGOL 68]]. However unlike ALGOL W that was a systems language with a true native code compiler, Pascal was very much intended as a teaching language and therefore simplified and was distributed in as an [[p-code]] interpreter that had no system specific features so that programs were fully portable. | ||
Over time there was an increased interest in using the language as a systems language and a number of persons and groups started to extend Pascal in various directions and create native compilers for it, however implementations have a tendency to differ from one another more than with many other languages as the most popular variations of Pascal compilers never adhering to formal standards in anything but name. | Over time there was an increased interest in using the language as a systems language and a number of persons and groups started to extend Pascal in various directions and create native compilers for it, however implementations have a tendency to differ from one another more than with many other languages as the most popular variations of Pascal compilers never adhering to formal standards in anything but name. | ||
== | ==History== | ||
Development of Pascal was started by Niklaus Wirth at ETH in 1968 with the first public version being shipped in 1970. | |||
;Pascal on OS/2 | |||
Pascal was heavily used in the development of OS/2 1.x as can be seen by the OS/2 1.x [[API]] that follows the Pascal calling convention unlike the OS/2 v2 and later API that follows the [[C]] convention. With the initial release of 32-bit OS/2 there were basically two native 32-bit Pascal development systems that were available fairly soon after the introduction of OS/2 2.x and that was quickly followed by an open source compiler. However these were all ISO Pascal implementations and as the vast bulk of OS/2 users came from the [[DOS]] world what the market really wanted was [[Turbo Pascal]] compatible systems. | |||
[[IBM]] was acutely aware of this and had during the Alpha phase contracted with [[Borland]] to supply a version of TP for the operating system but that never happened, and Borland delivered the [[Borland C++]] package instead. This course of events left IBM somewhat less than happy as there were already five commercial C/C++ compilers available for the system and it was neither what they had paid for nor what the market really needed, and on top of that was in competition with their own [[IBM C Set/2]]. | |||
This lead to a number of smaller companies and individuals starting to develop their own Turbo Pascal compatible tools, initially there were freeware and shareware tools that allowed you to use Borland Pascal to develop software for OS/2 but later there were full-blown developers system that offered compatibility with TP and/or the later Delphi system from Borland. None of these however saw a release until the mid 90s and most were delivered in the latter half of the decade even though one of them had been developed as early as 1993, but as all developers were small companies or individuals they were reluctant to spend money on developing and marketing something that would compete with a Borland Pascal release that everyone was expecting. | |||
This meant that unlike many OS/2 product niches that were almost starved of software there were by the latter half of the 90s no less than 10 available and supported Pascal implementations in one form or another available for the system in addition to a couple that were available but no longer received any updates. There had already been considerable attrition in the world of C/C++ where many of the smaller developers could not compete with the likes of IBM and [[Watcom]] and had to exit the market even though the total number of implementations was lower than with Pascal, but this relative glut of products had the predictable end result that while a number of these sold reasonably. None of them did so in any great number and all but two had ceased active development by 1997, but the remaining two were doing so at a considerably slowed down pace. | |||
What is interesting is that the vendors that offered versions for more than one platform fared no better than the ones that only targeted OS/2, Delphi was simply too entrenched on Windows for an alternative to have any chance of selling in any numbers and marketing on the Windows platform was considerably more expensive than for OS/2, in fact most packages sold in fewer numbers on Windows than OS/2. In hindsight it is also notable that the tools that went out of their way to emulate either Turbo Pascal or the later Delphi offer very little in the way of support for OS/2 features, none of them had [[SOM]] emitting compilers or [[WPS]] integration libraries, some of them do not even create DLLs correctly or offer properly threaded libraries. | |||
==OS/2 implementations== | |||
;16-bit | |||
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> | <div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> | ||
* [[IBM Pascal Compiler/2]] | |||
* [[Microsoft Pascal]] | |||
* Nat Systems Object Pascal for OS/2 | |||
* [[Pecan UCSD Pascal]] | |||
* [[IBM Pascal Compiler/2]] | * [[Prospero Pascal]] | ||
* [[TopSpeed Pascal]] | |||
* [[Microsoft Pascal]] | |||
* | |||
* [[Pecan UCSD Pascal]] | |||
* [[Prospero Pascal]] | |||
* [[TopSpeed Pascal]] | |||
</div> | </div> | ||
= | ;32-bit | ||
* [[ | <div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> | ||
''Commercial'' | |||
*[[Cabot UCSD Pascal]] | |||
*[[Irie Pascal]] - Shareware | |||
*[[NDP Pascal]] | |||
*[[Personal Pascal]] | |||
*Power Pascal - Shareware | |||
*[[Prospero Extended Pascal]] | |||
*[[SpeedSoft Speed-Pascal/2]] | |||
*[[Stony Brook Pascal+]] | |||
*[[TMT Pascal]] - Still sold and supported but no development | |||
*[[Virtual Pascal]] - Freeware | |||
''Open source'' | |||
*[[Free Pascal]] | |||
*[[GNU Pascal]] | |||
*[[Open Sibyl]] | |||
*[[Pascal-XSC]] | |||
*PasOS2 - aka P32 | |||
*Super Pascal | |||
*ucsd-psystem-xc | |||
* [[WDSibyl]] - Still developed | |||
</div> | |||
=== | ===Related utilities=== | ||
* [[Exuberant ctags]] - Creates index files out of Pascal source files - Open source | |||
* [[Exuberant ctags]] - Creates index files out of Pascal source files - Open source | |||
* [[Turbo Pascal Lex/YACC]] - Parser generator | * [[Turbo Pascal Lex/YACC]] - Parser generator | ||
== | ==DOS implementations== | ||
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> | <div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> | ||
''Open source'' | |||
* [[ | * [[Alice Pascal]] - Originally commercial | ||
* [[Free Pascal]] | * CoPascal (Concurrent Pascal) | ||
* [[GNU Pascal]] | * [[Free Pascal]] | ||
* [[IBM Pascal]] | * [[GNU Pascal]] | ||
* [[Irie Pascal]] - Shareware | ''Commercial'' | ||
* [[MetaWare Professional Pascal]] | * BCi Pascal | ||
* [[Microsoft Pascal]] | * [[IBM PC Pascal Compiler]] | ||
* [[Mystic Pascal]] - | * [[Irie Pascal]] - Shareware | ||
* [[Pascal/MT+]] | * [[MetaWare Professional Pascal]] | ||
* [[Pecan UCSD Pascal]] - 16 bit only | * [[Microsoft Pascal]] | ||
* [[Prospero Pascal]] - 16 bit only | * [[Mystic Pascal]] | ||
* [[QuickPascal]] - 16 bit only | * Oregon Software Pascal-2 | ||
* [[Stony Brook Pascal+]] | * [[Pascal/MT+]] | ||
* [[TMT Pascal]] | * [[Pecan UCSD Pascal]] - 16-bit only | ||
* [[TopSpeed Pascal]] | * [[Prospero Pascal]] - 16-bit only | ||
* [[Turbo Pascal]] | * [[Prospero Extended Pascal]] | ||
* [[Virtual Pascal]] - As target only - Freeware | * [[QuickPascal]] - 16-bit only | ||
* [[Stony Brook Pascal+]] | |||
* [[TMT Pascal]] | |||
* [[TopSpeed Pascal]] | |||
* [[Turbo Pascal]] - Some early versions now freeware | |||
* [[Virtual Pascal]] - As target only - Freeware | |||
</div> | </div> | ||
== | ==Win-OS/2 Implementations== | ||
* [[Borland Pascal]] - Cross compilation from DOS only | |||
* [[Delphi]] - Early versions supported Win-OS/2 | |||
* [[Extended Pascal]] - Cross compilation from DOS or OS/2 only | |||
* [[Borland Pascal]] | |||
* [[Delphi]] - Early versions supported | |||
* [[Extended Pascal]] | |||
* [[TMT Pascal]] - Early win versions ran as Win32s tasks. | * [[TMT Pascal]] - Early win versions ran as Win32s tasks. | ||
* [[TopSpeed Pascal]] | * [[TopSpeed Pascal]] - Cross compilation from DOS or OS/2 only | ||
;Closely related language variants | |||
* | *Turing - Early version ran under Win-OS/2 or Win32s - Modern version run fine under [[Odin]] - Excellent teaching or self learning tool. | ||
== | ==Java Implementations== | ||
* [[Canterbury Pascal for Java]] | * [[Canterbury Pascal for Java]] | ||
* [http://midletpascal.sourceforge.net/ MIDLet Pascal] - Open source | * [http://midletpascal.sourceforge.net/ MIDLet Pascal] - Open source | ||
* | *Oxygene - Object Pascal/Delphi like tool that works under a number of platforms. | ||
* [https://code.google.com/p/pascalinterpreterinjava/ Pascal Interpreter in Java] - Open source | * [https://code.google.com/p/pascalinterpreterinjava/ Pascal Interpreter in Java] - Open source | ||
* [https://sourceforge.net/projects/vectorpascalcom/ Vector Pascal Compiler] - Open Source (GPLv2) | * [https://sourceforge.net/projects/vectorpascalcom/ Vector Pascal Compiler] - Open Source (GPLv2) | ||
==Publications== | ==Publications== | ||
* Niklaus Wirth: [http://pascal-central.com/docs/pascal1973.pdf The Programming Language Pascal] - 1973 revised edition. | * Niklaus Wirth: [http://pascal-central.com/docs/pascal1973.pdf The Programming Language Pascal] - 1973 revised edition. | ||
* | * Gerd Bohlender, Christian Ullrich, Jürgen Wolff von Gudenberg: ''Pascal-SC: A Computer Language for Scientific Computation'' Academic Press 1987, ISBN 0-12-11155-5 | ||
==Links== | |||
* [http://pascal.hansotten.com Pascal for small machines] - Pascal and Oberon related blog | |||
;USENET | |||
* [ | * [news:comp.lang.pascal.misc comp.lang.pascal.misc] - Mostly used by Turbo/Delphi/FP crowd although it is supposed to be for other Pascal implementations since these have their own newsgroups. | ||
* | * [news:comp.lang.pascal.ansi-iso comp.lang.pascal.ansi-iso] - Discussing Standard and extended Pascal, very low volume. | ||
* [news:comp.lang.pascal.borland comp.lang.pascal.borland] - Discussing Borland Pascal and compatibles, low volume. | |||
;Tutorials and other learning material | |||
* [http://www.tutorialspoint.com/pascal/ A Pascal tutorial] from Tutorials Point - Delphi oriented but works with the [[Turbo Pascal|/Borland Pascal/Delphi]] compatible OS/2 tools. | * [http://www.tutorialspoint.com/pascal/ A Pascal tutorial] from Tutorials Point - Delphi oriented but works with the [[Turbo Pascal|/Borland Pascal/Delphi]] compatible OS/2 tools. | ||
* A very simple [http://www.taoyue.com/tutorials/pascal/ beginners tutorial] by TaoYue.com | * A very simple [http://www.taoyue.com/tutorials/pascal/ beginners tutorial] by TaoYue.com | ||
* [http://www.pp4s.co.uk Pascal Programming For Schools] - Targeted towards Lazarus, Delphi and | * [http://www.pp4s.co.uk Pascal Programming For Schools] - Targeted towards Lazarus, Delphi and Oxygene but portions of it are applicable to [[WDSibyl]] and the like. | ||
==Standards== | ==Standards== | ||
Early on most Pascal implementations were based on code from ETH so even if they derived from the original "The Programming Language Pascal" book, code remained fairly portable as most changes were additions rather than base changes. [[UCSD Pascal]], an extended interpreter based on an earlier | Early on most Pascal implementations were based on code from ETH so even if they derived from the original "The Programming Language Pascal" book, code remained fairly portable as most changes were additions rather than base changes. [[UCSD Pascal]], an extended interpreter based on an earlier Pascal-P2 became very influential especially in the USA. Initially a commercial system it was later found to be in the [[Public Domain]] as it had been developed with funds from the public purse and was therefore taken on by a number of companies as the base for their systems, most notably [[Apple]] that used it and home built derivatives as the main development tools for the Apple III, Lisa and Macintosh. Similarly, [[Microsoft]] used UCSD Pascal not only as the basis of their [[Microsoft Pascal]] offering but based their in-house [[C]] compiler on the package. | ||
The main obstacle to the propagation of Pascal standards has been [[Turbo Pascal]], it was originally a [[CP/M]] compiler that implements a Pascal subset in assembly code in order to work with the extreme memory constraints of the 8 bit Z80, cutting a lot of corners to make the system faster to work with. When it was ported to DOS it was more or less a straight port that took no advantage of the larger memory capabilities of the IBM PC. This is in some ways understandable since the 8088 equipped PC/XT, although capable of directly addressing a much larger memory space than the Z80, is really an 8 bit processor in disguise and was a dog speedwise, in real terms slower than many of the Z80 systems it replaced so sacrificing code quality and features for compilation speed made some sense on these early systems. | The main obstacle to the propagation of Pascal standards has been [[Turbo Pascal]], it was originally a [[CP/M]] compiler that implements a Pascal subset in assembly code in order to work with the extreme memory constraints of the 8 bit Z80, cutting a lot of corners to make the system faster to work with. When it was ported to DOS it was more or less a straight port that took no advantage of the larger memory capabilities of the IBM PC. This is in some ways understandable since the 8088 equipped PC/XT, although capable of directly addressing a much larger memory space than the Z80, is really an 8-bit processor in disguise and was a dog speedwise, in real terms slower than many of the Z80 systems it replaced so sacrificing code quality and features for compilation speed made some sense on these early systems. | ||
Due to its low price in addition to good support and marketing by developer [[Borland]] it became not only by far the best selling Pascal implementation on the planet but the best selling development system of any sort for the next decade. In order to leverage its position in the market Borland decided to scrap the development of the next generation multi language system that they had been working on for some time that featured an ISO compliant Pascal (although it resurfaced later | Due to its low price in addition to good support and marketing by developer [[Borland]] it became not only by far the best-selling Pascal implementation on the planet but the best-selling development system of any sort for the next decade. In order to leverage its position in the market, Borland decided to scrap the development of the next generation multi-language system that they had been working on for some time that featured an ISO compliant Pascal (although it resurfaced later than [[TopSpeed Pascal]] and was the basis for the other TopSpeed compilers as well) and continue with the Turbo Pascal line that had established itself as a de-facto standard, and add some extensions taken from Apple's Object Pascal and some changes that allowed better compatibility with [[C]] headers and development systems. | ||
This left us with Borland Pascal and Delphi, that manage to be both Pascal subsets and supersets at the same time, lack portability and have become somewhat muddled, with inconsistent syntax, lacking the coherence and simplicity of the ISO standards in addition to imports from C/C++ that look out of place and should really have been implemented as libraries rather than language features. This "divide and rule" strategy was initially successful as both systems sold well for a time and almost all commercial and open source tools developed since ape the Turbo Pascal/Delphi syntax rather than ISO Pascal, but in the long term it became a disaster, especially the decision to scrap the multi-language compiler which was a tool the company had to recreate later at a considerable cost and it is one of the reasons the Borland company no longer exists. | This left us with Borland Pascal and Delphi, that manage to be both Pascal subsets and supersets at the same time, lack portability and have become somewhat muddled, with inconsistent syntax, lacking the coherence and simplicity of the ISO standards in addition to imports from C/C++ that look out of place and should really have been implemented as libraries rather than language features. This "divide and rule" strategy was initially successful as both systems sold well for a time and almost all commercial and open source tools developed since ape the Turbo Pascal/Delphi syntax rather than ISO Pascal, but in the long term it became a disaster, especially the decision to scrap the multi-language compiler which was a tool the company had to recreate later at a considerable cost, and it is one of the reasons the Borland company no longer exists. | ||
* Initial "standard" was simply the 1970 edition of the book "The Programming Language Pascal" by Niklaus Wirth. | * Initial "standard" was simply the 1970 edition of the book "The Programming Language Pascal" by Niklaus Wirth. | ||
* The '''Pascal-S''' subset, is not as often reported | * The '''Pascal-S''' subset, is not as often reported an "educational subset" of Pascal, but rather a minimal version of the language that ran much faster on the ETH CDC computer than the full-blown Pascal system, allowing students a better chance of getting their programs compiled and run on the system than with a full compiler kit. | ||
* The original Pascal report got a few revisions such as the | * The original Pascal report got a few revisions, such as the 1972 and 1973 edition of the book "The Programming Language Pascal (Revised)" by Niklaus Wirth. | ||
* UCSD and ETH P4 interpreters become de-facto standards with most Pascal implementation following the one or the other. | * UCSD and ETH P4 interpreters become de-facto standards with most Pascal implementation following the one or the other. | ||
* ISO 7185 Pascal is basically ETH P4 with some clarifications and minor changes, it was ratified in 1982 and received some further changes in 1990 primarily to enhance compatibility with ISO 10206, and is in common usage referred to as "Standard Pascal". It had a strong following for a while but ISO compliant programming tools are getting thin on the ground these days due to the popularity of TP compatible tools. | * ISO 7185 Pascal is basically ETH P4 with some clarifications and minor changes, it was ratified in 1982 and received some further changes in 1990 primarily to enhance compatibility with ISO 10206, and is in common usage referred to as "Standard Pascal". It had a strong following for a while but ISO compliant programming tools are getting thin on the ground these days due to the popularity of TP compatible tools. | ||
* ANSI ratified a standard in 1983 that was based on the "home grown" UCSD Pascal but deferred to ISO Pascal in | * ANSI ratified a standard in 1983 that was based on the "home-grown" UCSD Pascal but deferred to ISO Pascal in regard to the base language, this was largely ignored and no-one appears to have released tools based on this standard, but the ANSI standards group merged with an IEEE Pascal standards group and they collaborated with the ISO standards committee over the next few years resulting in the "Extended Pascal" standard below. | ||
* The Open Group added their own clarifications and minor additions to ISO for increased code portability in the [http://www.opengroup.org/infosrv/Brand/SPS_pdf/pascal.pdf Product Standard for Operating System and Languages: Pascal Language] | * The Open Group added their own clarifications and minor additions to ISO for increased code portability in the [http://www.opengroup.org/infosrv/Brand/SPS_pdf/pascal.pdf Product Standard for Operating System and Languages: Pascal Language] | ||
* ISO 10206 was ratified in 1990 and is commonly known as "Extended Pascal", it adds expressions, the module system and separate compilation from [[Modula-2]], non-static types, mathematical types and a whole host of other primarily minor goodies but also makes some of the syntax more flexible. | * ISO 10206 was ratified in 1990 and is commonly known as "Extended Pascal", it adds expressions, the module system and separate compilation from [[Modula-2]], non-static types, mathematical types and a whole host of other primarily minor goodies but also makes some of the syntax more flexible. | ||
* The Object Pascal variant that was used in Apple Pascal and Borland Pascal/Delphi has never been standardised and most implementations simply ape the Apple syntax and later Borland additions. There was an attempt in the early | * The Object Pascal variant that was used in Apple Pascal and Borland Pascal/Delphi has never been standardised and most implementations simply ape the Apple syntax and later Borland additions. There was an attempt in the early 90s to create a standard but as Apple was switching to C in wake of their collaboration with IBM on [[PINK]] and Borland had no interest in what they saw as a tool to help their competitors create compatible systems, so the attempt floundered due to lack of industry support. | ||
* In 1993 | * In 1993 object-oriented extensions for Standard and Extended Pascal were proposed, you can read [http://pascal-central.com/docs/oopascal.txt proposals here] | ||
[[Category:Programming Languages]] | [[Category:Programming Languages]][[Category:Pascal]] | ||
[[Category:Pascal]] |
Latest revision as of 11:23, 18 May 2025

Structured procedural language introduced by Niklaus Wirth in 1970 although it had been used internally by ETH as early as 1968, based partially on his earlier ALGOL W language that had been proposed in 1966 to the Algol committee but rejected in favour of the much more complex ALGOL 68. However unlike ALGOL W that was a systems language with a true native code compiler, Pascal was very much intended as a teaching language and therefore simplified and was distributed in as an p-code interpreter that had no system specific features so that programs were fully portable.
Over time there was an increased interest in using the language as a systems language and a number of persons and groups started to extend Pascal in various directions and create native compilers for it, however implementations have a tendency to differ from one another more than with many other languages as the most popular variations of Pascal compilers never adhering to formal standards in anything but name.
History
Development of Pascal was started by Niklaus Wirth at ETH in 1968 with the first public version being shipped in 1970.
- Pascal on OS/2
Pascal was heavily used in the development of OS/2 1.x as can be seen by the OS/2 1.x API that follows the Pascal calling convention unlike the OS/2 v2 and later API that follows the C convention. With the initial release of 32-bit OS/2 there were basically two native 32-bit Pascal development systems that were available fairly soon after the introduction of OS/2 2.x and that was quickly followed by an open source compiler. However these were all ISO Pascal implementations and as the vast bulk of OS/2 users came from the DOS world what the market really wanted was Turbo Pascal compatible systems.
IBM was acutely aware of this and had during the Alpha phase contracted with Borland to supply a version of TP for the operating system but that never happened, and Borland delivered the Borland C++ package instead. This course of events left IBM somewhat less than happy as there were already five commercial C/C++ compilers available for the system and it was neither what they had paid for nor what the market really needed, and on top of that was in competition with their own IBM C Set/2.
This lead to a number of smaller companies and individuals starting to develop their own Turbo Pascal compatible tools, initially there were freeware and shareware tools that allowed you to use Borland Pascal to develop software for OS/2 but later there were full-blown developers system that offered compatibility with TP and/or the later Delphi system from Borland. None of these however saw a release until the mid 90s and most were delivered in the latter half of the decade even though one of them had been developed as early as 1993, but as all developers were small companies or individuals they were reluctant to spend money on developing and marketing something that would compete with a Borland Pascal release that everyone was expecting.
This meant that unlike many OS/2 product niches that were almost starved of software there were by the latter half of the 90s no less than 10 available and supported Pascal implementations in one form or another available for the system in addition to a couple that were available but no longer received any updates. There had already been considerable attrition in the world of C/C++ where many of the smaller developers could not compete with the likes of IBM and Watcom and had to exit the market even though the total number of implementations was lower than with Pascal, but this relative glut of products had the predictable end result that while a number of these sold reasonably. None of them did so in any great number and all but two had ceased active development by 1997, but the remaining two were doing so at a considerably slowed down pace.
What is interesting is that the vendors that offered versions for more than one platform fared no better than the ones that only targeted OS/2, Delphi was simply too entrenched on Windows for an alternative to have any chance of selling in any numbers and marketing on the Windows platform was considerably more expensive than for OS/2, in fact most packages sold in fewer numbers on Windows than OS/2. In hindsight it is also notable that the tools that went out of their way to emulate either Turbo Pascal or the later Delphi offer very little in the way of support for OS/2 features, none of them had SOM emitting compilers or WPS integration libraries, some of them do not even create DLLs correctly or offer properly threaded libraries.
OS/2 implementations
- 16-bit
- IBM Pascal Compiler/2
- Microsoft Pascal
- Nat Systems Object Pascal for OS/2
- Pecan UCSD Pascal
- Prospero Pascal
- TopSpeed Pascal
- 32-bit
Commercial
- Cabot UCSD Pascal
- Irie Pascal - Shareware
- NDP Pascal
- Personal Pascal
- Power Pascal - Shareware
- Prospero Extended Pascal
- SpeedSoft Speed-Pascal/2
- Stony Brook Pascal+
- TMT Pascal - Still sold and supported but no development
- Virtual Pascal - Freeware
Open source
- Free Pascal
- GNU Pascal
- Open Sibyl
- Pascal-XSC
- PasOS2 - aka P32
- Super Pascal
- ucsd-psystem-xc
- WDSibyl - Still developed
Related utilities
- Exuberant ctags - Creates index files out of Pascal source files - Open source
- Turbo Pascal Lex/YACC - Parser generator
DOS implementations
Open source
- Alice Pascal - Originally commercial
- CoPascal (Concurrent Pascal)
- Free Pascal
- GNU Pascal
Commercial
- BCi Pascal
- IBM PC Pascal Compiler
- Irie Pascal - Shareware
- MetaWare Professional Pascal
- Microsoft Pascal
- Mystic Pascal
- Oregon Software Pascal-2
- Pascal/MT+
- Pecan UCSD Pascal - 16-bit only
- Prospero Pascal - 16-bit only
- Prospero Extended Pascal
- QuickPascal - 16-bit only
- Stony Brook Pascal+
- TMT Pascal
- TopSpeed Pascal
- Turbo Pascal - Some early versions now freeware
- Virtual Pascal - As target only - Freeware
Win-OS/2 Implementations
- Borland Pascal - Cross compilation from DOS only
- Delphi - Early versions supported Win-OS/2
- Extended Pascal - Cross compilation from DOS or OS/2 only
- TMT Pascal - Early win versions ran as Win32s tasks.
- TopSpeed Pascal - Cross compilation from DOS or OS/2 only
- Closely related language variants
- Turing - Early version ran under Win-OS/2 or Win32s - Modern version run fine under Odin - Excellent teaching or self learning tool.
Java Implementations
- Canterbury Pascal for Java
- MIDLet Pascal - Open source
- Oxygene - Object Pascal/Delphi like tool that works under a number of platforms.
- Pascal Interpreter in Java - Open source
- Vector Pascal Compiler - Open Source (GPLv2)
Publications
- Niklaus Wirth: The Programming Language Pascal - 1973 revised edition.
- Gerd Bohlender, Christian Ullrich, Jürgen Wolff von Gudenberg: Pascal-SC: A Computer Language for Scientific Computation Academic Press 1987, ISBN 0-12-11155-5
Links
- Pascal for small machines - Pascal and Oberon related blog
- USENET
- comp.lang.pascal.misc - Mostly used by Turbo/Delphi/FP crowd although it is supposed to be for other Pascal implementations since these have their own newsgroups.
- comp.lang.pascal.ansi-iso - Discussing Standard and extended Pascal, very low volume.
- comp.lang.pascal.borland - Discussing Borland Pascal and compatibles, low volume.
- Tutorials and other learning material
- A Pascal tutorial from Tutorials Point - Delphi oriented but works with the /Borland Pascal/Delphi compatible OS/2 tools.
- A very simple beginners tutorial by TaoYue.com
- Pascal Programming For Schools - Targeted towards Lazarus, Delphi and Oxygene but portions of it are applicable to WDSibyl and the like.
Standards
Early on most Pascal implementations were based on code from ETH so even if they derived from the original "The Programming Language Pascal" book, code remained fairly portable as most changes were additions rather than base changes. UCSD Pascal, an extended interpreter based on an earlier Pascal-P2 became very influential especially in the USA. Initially a commercial system it was later found to be in the Public Domain as it had been developed with funds from the public purse and was therefore taken on by a number of companies as the base for their systems, most notably Apple that used it and home built derivatives as the main development tools for the Apple III, Lisa and Macintosh. Similarly, Microsoft used UCSD Pascal not only as the basis of their Microsoft Pascal offering but based their in-house C compiler on the package.
The main obstacle to the propagation of Pascal standards has been Turbo Pascal, it was originally a CP/M compiler that implements a Pascal subset in assembly code in order to work with the extreme memory constraints of the 8 bit Z80, cutting a lot of corners to make the system faster to work with. When it was ported to DOS it was more or less a straight port that took no advantage of the larger memory capabilities of the IBM PC. This is in some ways understandable since the 8088 equipped PC/XT, although capable of directly addressing a much larger memory space than the Z80, is really an 8-bit processor in disguise and was a dog speedwise, in real terms slower than many of the Z80 systems it replaced so sacrificing code quality and features for compilation speed made some sense on these early systems.
Due to its low price in addition to good support and marketing by developer Borland it became not only by far the best-selling Pascal implementation on the planet but the best-selling development system of any sort for the next decade. In order to leverage its position in the market, Borland decided to scrap the development of the next generation multi-language system that they had been working on for some time that featured an ISO compliant Pascal (although it resurfaced later than TopSpeed Pascal and was the basis for the other TopSpeed compilers as well) and continue with the Turbo Pascal line that had established itself as a de-facto standard, and add some extensions taken from Apple's Object Pascal and some changes that allowed better compatibility with C headers and development systems.
This left us with Borland Pascal and Delphi, that manage to be both Pascal subsets and supersets at the same time, lack portability and have become somewhat muddled, with inconsistent syntax, lacking the coherence and simplicity of the ISO standards in addition to imports from C/C++ that look out of place and should really have been implemented as libraries rather than language features. This "divide and rule" strategy was initially successful as both systems sold well for a time and almost all commercial and open source tools developed since ape the Turbo Pascal/Delphi syntax rather than ISO Pascal, but in the long term it became a disaster, especially the decision to scrap the multi-language compiler which was a tool the company had to recreate later at a considerable cost, and it is one of the reasons the Borland company no longer exists.
- Initial "standard" was simply the 1970 edition of the book "The Programming Language Pascal" by Niklaus Wirth.
- The Pascal-S subset, is not as often reported an "educational subset" of Pascal, but rather a minimal version of the language that ran much faster on the ETH CDC computer than the full-blown Pascal system, allowing students a better chance of getting their programs compiled and run on the system than with a full compiler kit.
- The original Pascal report got a few revisions, such as the 1972 and 1973 edition of the book "The Programming Language Pascal (Revised)" by Niklaus Wirth.
- UCSD and ETH P4 interpreters become de-facto standards with most Pascal implementation following the one or the other.
- ISO 7185 Pascal is basically ETH P4 with some clarifications and minor changes, it was ratified in 1982 and received some further changes in 1990 primarily to enhance compatibility with ISO 10206, and is in common usage referred to as "Standard Pascal". It had a strong following for a while but ISO compliant programming tools are getting thin on the ground these days due to the popularity of TP compatible tools.
- ANSI ratified a standard in 1983 that was based on the "home-grown" UCSD Pascal but deferred to ISO Pascal in regard to the base language, this was largely ignored and no-one appears to have released tools based on this standard, but the ANSI standards group merged with an IEEE Pascal standards group and they collaborated with the ISO standards committee over the next few years resulting in the "Extended Pascal" standard below.
- The Open Group added their own clarifications and minor additions to ISO for increased code portability in the Product Standard for Operating System and Languages: Pascal Language
- ISO 10206 was ratified in 1990 and is commonly known as "Extended Pascal", it adds expressions, the module system and separate compilation from Modula-2, non-static types, mathematical types and a whole host of other primarily minor goodies but also makes some of the syntax more flexible.
- The Object Pascal variant that was used in Apple Pascal and Borland Pascal/Delphi has never been standardised and most implementations simply ape the Apple syntax and later Borland additions. There was an attempt in the early 90s to create a standard but as Apple was switching to C in wake of their collaboration with IBM on PINK and Borland had no interest in what they saw as a tool to help their competitors create compatible systems, so the attempt floundered due to lack of industry support.
- In 1993 object-oriented extensions for Standard and Extended Pascal were proposed, you can read proposals here