Pascal (programming language): Difference between revisions

Content deleted Content added
m fixed lint errors – missing end tag
Rescuing 9 sources and tagging 0 as dead.) #IABot (v2.0.9.5
Line 25:
* [[Component Pascal]]
* [[Go (programming language)|Go]]
* [[Java (programming language)|Java]]<ref>{{cite web| url=http://java.sun.com/docs/white/delegates.html |title=About Microsoft's "Delegates" |archive-url=https://web.archive.org/web/20120627043929/http://java.sun.com/docs/white/delegates.html |archive-date=2012-06-27 |quote=We looked very carefully at Delphi [[Object Pascal]] and built a working prototype of bound method references in order to understand their interaction with the Java programming language and its APIs&nbsp;... Our conclusion was that bound method references are unnecessary and detrimental to the language. This decision was made in consultation with Borland International, who had previous experience with bound method references in Delphi [[Object Pascal]].}}</ref><ref>{{cite web |url=http://www.fscript.org/prof/javapassport.pdf |quote=The project went ahead under the name "green" and the language was based on an old model of [[UCSD Pascal]], which makes it possible to generate interpretive code |title=History of Java |work=Java Application Servers Report |author=TechMetrix Research |date=1999 |url-status=deaddeviated |archive-url=https://web.archive.org/web/20101229090912/http://www.fscript.org/prof/javapassport.pdf |archive-date=2010-12-29 |access-date=2009-10-16 |archivedate=2010-12-29 |archiveurl=https://web.archive.org/web/20101229090912/http://www.fscript.org/prof/javapassport.pdf }}</ref><ref>{{cite web|url=http://queue.acm.org/detail.cfm?id=1017013|title=A Conversation with James Gosling – ACM Queue|access-date=11 August 2015|url-status=live|archive-url=https://web.archive.org/web/20150716194245/http://queue.acm.org/detail.cfm?id=1017013|archive-date=16 July 2015}}</ref>
* [[Modula]]{{\}}[[Modula-2|-2]]{{\}}[[Modula-3|-3]]
* [[Oberon (programming language)|Oberon]]{{\}}[[Oberon-2|-2]]
Line 84:
During work on the Lisa, [[Larry Tesler]] began corresponding with Wirth on the idea of adding object-oriented extensions to the language, to make Pascal a [[Programming paradigm|Multi-paradigm programming language]]. This led initially to [[Clascal]], introduced in 1983. As the Lisa program faded and was replaced by the Macintosh, a further version was created and named [[Object Pascal]]. This was introduced on the Mac in 1985 as part of the [[MacApp]] [[application framework]], and became Apple's main development language into the early 1990s.
 
The Object Pascal extensions were added to [[Turbo Pascal]] with the release of version 5.5 in 1989.<ref>{{cite web|title=Antique Software: Turbo Pascal v5.5|url=http://edn.embarcadero.com/article/20803|access-date=2018-05-17|archive-date=2010-11-24|archive-url=https://web.archive.org/web/20101124090934/http://edn.embarcadero.com/article/20803|url-status=deaddeviated|archivedate=2010-11-24|archiveurl=https://web.archive.org/web/20101124090934/http://edn.embarcadero.com/article/20803}}</ref> Over the years, Object Pascal became the basis of the [[Delphi (software)|Delphi]] system for [[Microsoft Windows]], which is still used for developing Windows applications, and can [[cross-compile]] code to other systems. [[Free Pascal]] is an open source, cross-platform alternative with its own graphical [[integrated development environment|IDE]] called [[Lazarus (IDE)|Lazarus]].
 
==Implementations==
Line 439:
* {{anchor|[[Pascal-S]]}}Pascal-S<ref>"Pascal-S: A Subset and Its Implementation", N. Wirth in Pascal – The Language and Its Implementation, by D.W. Barron, Wiley 1979.</ref>
* AmigaPascal is a free Pascal compiler for [[Amiga]] systems.
* VSI Pascal for OpenVMS (formerly HP Pascal for OpenVMS, Compaq Pascal, DEC Pascal, VAX Pascal and originally VAX-11 Pascal<ref>{{Cite web|url=http://www.bitsavers.org/pdf/dec/vax/lang/pascal/AA-H485A-TE_VAX-11_PASCAL_V1.0_Users_Guide_Nov79.pdf|title=VAX-11 Pascal V1.0 User's Guide}}</ref>) is a Pascal compiler that runs on [[OpenVMS]] systems.<ref name="vsi-spd" /> It was also supported under [[Tru64]].<ref>{{cite web|url=http://www.pascal-central.com/interview1.html|title=Interview with a Pascal Architect - Compaq Pascal|access-date=2022-05-28|archive-date=2021-10-19|archive-url=https://web.archive.org/web/20211019203732/http://pascal-central.com/interview1.html|url-status=deaddeviated|archivedate=2021-10-19|archiveurl=https://web.archive.org/web/20211019203732/http://pascal-central.com/interview1.html}}</ref><ref>{{cite web|url=http://h30266.www3.hpe.com/masterindex/spd/spd_00049c78.txt|title=Compaq Pascal Version 5.8 for Tru64 UNIX Software Product Description|access-date=2022-05-28|archive-date=2020-07-25|archive-url=https://web.archive.org/web/20200725235351/http://h30266.www3.hpe.com/masterindex/spd/spd_00049c78.txt|url-status=deaddeviated|archivedate=2020-07-25|archiveurl=https://web.archive.org/web/20200725235351/http://h30266.www3.hpe.com/masterindex/spd/spd_00049c78.txt}}</ref> VSI Pascal for OpenVMS is compatible with ISO/IEC 7185:1990 Pascal as well some of ISO/IEC 10206:1990 Extended Pascal, and also includes its own extensions.<ref name="vsi-spd">{{cite web|url=https://vmssoftware.com/docs/VSI_Pascal_spd.pdf|title=VSI Pascal for OpenVMS Software Product Description|publisher=VSI|date=2017|access-date=2022-02-07|archive-date=2021-04-18|archive-url=https://web.archive.org/web/20210418211644/https://vmssoftware.com/docs/VSI_Pascal_spd.pdf|url-status=deaddeviated|archivedate=2021-04-18|archiveurl=https://web.archive.org/web/20210418211644/https://vmssoftware.com/docs/VSI_Pascal_spd.pdf}}</ref> The compiler [[Compiler#Front end|frontend]] is implemented in [[BLISS]].<ref name="ecube">{{cite web|url=http://blog.ecubesystems.com/vsis-john-reagan-interview-on-llvm/|archive-url=https://web.archive.org/web/20200812025318/http://blog.ecubesystems.com/vsis-john-reagan-interview-on-llvm/|title=VSI's John Reagan Interview on GEM vs. LLVM for X86/64|website=eCube Systems|date=2019-03-12|archive-date=2020-08-12|access-date=2022-02-07}}</ref>
* Stony Brook Pascal+ was a 16-bit (later 32-bit) optimizing compiler for DOS and OS/2, marketed as a direct replacement for Turbo Pascal, but producing code that executed at least twice as fast.
 
Line 453:
 
===ISO/IEC 7185:1990 Pascal===
In 1983, the language was standardized in the international standard IEC/ISO 7185<ref>{{cite book|title=ISO/IEC 7185:1990 Pascal|url=http://www.pascal-central.com/docs/iso7185.pdf|access-date=16 September 2014|url-status=deaddeviated|archive-url=https://web.archive.org/web/20160127044422/http://pascal-central.com/docs/iso7185.pdf|archive-date=27 January 2016|accessdate=16 September 2014|archivedate=27 January 2016|archiveurl=https://web.archive.org/web/20160127044422/http://pascal-central.com/docs/iso7185.pdf}}</ref> and several local country-specific standards, including the American ANSI/IEEE770X3.97-1983, and ISO 7185:1983. These two standards differed only in that the ISO standard included a "level 1" extension for conformant arrays (an array where the boundaries of the array are not known until run time), where ANSI did not allow for this extension to the original (Wirth version) language. In 1989, ISO 7185 was revised (ISO 7185:1990) to correct various errors and ambiguities found in the original document.
 
The ISO 7185 was stated to be a clarification of Wirth's 1974 language as detailed by the User Manual and Report [Jensen and Wirth], but was also notable for adding "Conformant Array Parameters" as a level 1 to the standard, level 0 being Pascal without conformant arrays. This addition was made at the request of [[C. A. R. Hoare]], and with the approval of Niklaus Wirth. The precipitating cause was that Hoare wanted to create a Pascal version of the [[NAG Numerical Libraries|(NAG) Numerical Algorithms Library]], which had originally been written in FORTRAN, and found that it was not possible to do so without an extension that would allow array parameters of varying size. Similar considerations motivated the inclusion in ISO 7185 of the facility to specify the parameter types of procedural and functional parameters.
Line 465:
===ISO/IEC 10206:1990 Extended Pascal===
{{Expand section|date=February 2018}}
In 1990, an extended Pascal standard was created as ISO/IEC 10206,<ref>{{cite book|title=Extended Pascal: ISO/IEC 10206:1990|url=http://www.dcs.gla.ac.uk/~wpc/reports/compilers/compilerindex/iso10206.ps|access-date=16 September 2014|url-status=dead|archive-url=https://web.archive.org/web/20160327025949/http://www.dcs.gla.ac.uk/%7Ewpc/reports/compilers/compilerindex/iso10206.ps|archive-date=2016-03-27}}</ref> which is identical in technical content<ref name="ISO/ANSI identical">{{cite web|title=Language standards: Pascal, Extended Pascal, Fortan|url=http://www.prosperosoftware.com/std.html|access-date=16 September 2014|ref=identical|archive-url=https://web.archive.org/web/20140714024231/http://www.prosperosoftware.com/std.html|archive-date=2014-07-14|archivedate=2014-07-14|archiveurl=https://web.archive.org/web/20140714024231/http://www.prosperosoftware.com/std.html|url-status=deviated}}</ref> to IEEE/ANSI 770X3.160-1989<ref>{{cite book|doi=10.1109/IEEESTD.1990.101061|isbn=978-0-7381-4247-0|date=1990 |title=IEEE/ANSI Standard for the Programming Language Extended Pascal}}</ref>
As of 2019, Support of Extended Pascal in [[FreePascal]] Compiler is planned.<ref>{{Cite web|url=https://wiki.freepascal.org/Extended_Pascal|title=Extended Pascal - Free Pascal wiki|website=wiki.freepascal.org}}</ref>
<!-- WHAT FOLLOW APPEARS FACTUALLY WRONG AND IS COMMENTED OUT FOR FUTURE REFERENCE
Line 493:
* [[Kylix (software)|Borland Kylix]] is a compiler and IDE formerly sold by Borland, but later discontinued. It is a [[Linux]] version of the [[Delphi (software)|Borland Delphi]] software development environment and [[C++Builder]].
* [[Lazarus (IDE)|Lazarus]] – similar to Kylix in function, is a free cross-platform visual IDE for RAD using the Free Pascal compiler, which supports dialects of [[Object Pascal]] to varying degrees.
* [[Virtual Pascal]] – VP2/1 is a fully Borland Pascal– and Borland Delphi–compatible 32-bit Pascal compiler for OS/2 and Windows 32 (with a Linux version "on the way").<ref>{{cite web |title=Virtual Pascal for OS/2 |url=http://www.pascal-central.com/vpascal.html |access-date=3 April 2016 |url-status=deaddeviated |archive-url=https://web.archive.org/web/20110830023208/http://pascal-central.com/vpascal.html |archive-date=30 August 2011 |archivedate=30 August 2011 |archiveurl=https://web.archive.org/web/20110830023208/http://pascal-central.com/vpascal.html }}</ref>
* Sybil is an open source Delphi-like IDE and compiler; implementations include:
** WDSibyl<ref>{{cite web |url=http://www.wdsibyl.org/ |title=WDSibyl: Visual Development Environment |author=Wolfgang |date=October 15, 2020 |website=WDSibyl.org |access-date=2020-04-20 |url-status=live |archive-url=https://web.archive.org/web/20200212174135/https://www.wdsibyl.org/ |archive-date=2020-02-12}}</ref> for [[Microsoft Windows]] and [[OS/2]], a commercial Borland Pascal compatible environment released by a company named Speedsoft that was later developed into a Delphi-like [[rapid application development]] (RAD) environment named Sybil and then open sourced under the GPL when that company closed down;
Line 507:
While very popular in the 1980s and early 1990s, implementations of Pascal that closely followed Wirth's initial definition of the language were widely criticized as being unsuitable for use outside teaching. [[Brian Kernighan]], who popularized the [[C (programming language)|C language]], outlined his most notable criticisms of Pascal as early as 1981 in his article "Why Pascal is Not My Favorite Programming Language".<ref>Brian W. Kernighan (1981). [http://www.lysator.liu.se/c/bwk-on-pascal.html "Why Pascal is Not My Favorite Programming Language"]. {{webarchive |url=https://web.archive.org/web/20090428163341/https://www.princeton.edu/~mike/unixhistory |date=2009-04-28}}</ref> The most serious problem Kernighan described was that array sizes and string lengths were part of the type, so it was not possible to write a function that would accept variable-length arrays or even strings as parameters. This made it unfeasible to write, for example, a sorting library. Kernighan also criticized the unpredictable order of evaluation of Boolean expressions, poor library support, and lack of [[static variable]]s, and raised a number of smaller issues. Also, he stated that the language did not provide any simple constructs to "escape" (knowingly and forcibly ignore) restrictions and limitations. More general complaints from other sources<ref name="Hoare.Sneeringer.Welsh.1977"/><ref>O. Lecarme, P. Desjardins, "More Comments on the Programming Language Pascal", ''Acta Informatica 4'', pp. 231–243 (1975).</ref> noted that the scope of declarations was not clearly defined in the original language definition, which sometimes had serious consequences when using [[forward declaration]]s to define pointer types, or when record declarations led to [[Recursive data type|mutual recursion]], or when an identifier may or may not have been used in an enumeration list. Another difficulty was that, like [[ALGOL 60]], the language did not allow procedures or functions passed as parameters to predefine the expected type of their parameters.
 
Despite initial criticisms, Pascal continued to evolve, and most of Kernighan's points do not apply to versions of the language which were enhanced to be suitable for commercial product development, such as Borland's [[Turbo Pascal]]. As Kernighan predicted in his article, most of the extensions to fix these issues were incompatible from compiler to compiler. Since the early 1990s, however, most of the varieties seem condensed into two categories: ISO and Borland-like. Extended Pascal addresses many of these early criticisms. It supports variable-length strings, variable initialization, separate compilation, short-circuit Boolean operators, and default (<code>otherwise</code>) clauses for case statements.<ref>{{Cite web |url=http://pascal-central.com/ppl/chapter3.html#Extended |title=Extended Pascal |url-status=deaddeviated |archive-url=https://web.archive.org/web/20151018023934/http://www.pascal-central.com/ppl/chapter3.html |archive-date=2015-10-18 |access-date=2015-10-17 |archivedate=2015-10-18 |archiveurl=https://web.archive.org/web/20151018023934/http://www.pascal-central.com/ppl/chapter3.html#Extended }}</ref>
 
==See also==