Pascal (programming language): Difference between revisions

Content deleted Content added
m fixed lint errors – missing end tag
+cat.
 
(33 intermediate revisions by 21 users not shown)
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=dead |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 }}</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 39:
| license =
| website =
| file_ext = .pas
| wikibooks = Pascal Programming
}}
'''Pascal''' is an [[Imperative programming|imperative]] and [[Procedural programming|procedural]] [[programming language]], designed by [[Niklaus Wirth]] as a small, efficient language intended to encourage good programming practices using [[structured programming]] and [[data structure|data structuring]]. It is named after French mathematician, philosopher and physicist [[Blaise Pascal]].{{efn|In an issue of ''[[Electronics (magazine)|Electronics]]'' in 1978, Wirth explained why he named the language after Blaise Pascal: "Actually, I am neither capable of fully understanding his philosophy nor of appreciating his religious exaltations. Pascal, however, was (perhaps one of) the first to invent and construct [[Pascal's calculator|a device]] that we now classify as a digital computer."<ref>{{cite magazine |last=Wirth |first=Niklaus |author-link=Niklaus Wirth |date=1978-12-21 |title=Obeisance to Pascal, inventor |magazine=[[Electronics (magazine)|Electronics]] |publisher=Dan McMillan |editor1-first=Kemp |editor1-last=Anderson |department=Readers' comments |issn=0013-5070 |url=https://www.worldradiohistory.com/Archive-Electronics/70s/78/Electronics-1978-12-21.pdf |access-date=2024-08-13 |archive-url=https://web.archive.org/web/20240520045053/https://www.worldradiohistory.com/Archive-Electronics/70s/78/Electronics-1978-12-21.pdf |archive-date=2024-05-20 |url-status=live |page=6}}</ref>}}
 
Pascal was developed on the pattern of the [[ALGOL 60]] language. Wirth was involved in the process to improve the language as part of the [[ALGOL X]] efforts and proposed a version named [[ALGOL W]]. This was not accepted, and the ALGOL X process bogged down. In 1968, Wirth decided to abandon the ALGOL X process and further improve ALGOL W, releasing this as Pascal in 1970.
 
On top of ALGOL's [[variable (computer science)|scalar]]s and [[array (data type)|arrays]], Pascal enables defining complex datatypes and building dynamic and recursive data structures such as [[list (abstract data type)|list]]s, [[tree (data structure)|tree]]s and [[graph (abstract data type)|graph]]s. Pascal has [[strong and weak typing|strong typing]] on all objects, which means that one type of data cannot be converted to or interpreted as another without explicit conversions. Unlike C (and also unlike most other languages in the [[C-family]]), Pascal allows [[nested procedure]] definitions to any level of depth, and also allows most kinds of definitions and declarations inside [[subroutines]] (procedures and functions). A program is thus syntactically similar to a single procedure or function. This is similar to the block structure of ALGOL 60, but restricted from arbitrary block statements to just procedures and functions.
 
Pascal became very successful in the 1970s, notably on the burgeoning [[minicomputer]] market. [[Compiler]]s were also available for many [[microcomputer]]s as the field emerged in the late 1970s. It was widely used as a teaching language in [[university]]-level programming courses in the 1980s, and also used in production settings for writing commercial software during the same period. It was displaced by the [[C (programming language)|C programming language]] during the late 1980s and early 1990s as [[UNIX]]-based systems became popular, and especially with the release of [[C++]].
 
A derivative named [[Object Pascal]] designed for [[object-oriented programming]] was developed in 1985. This was used by [[Apple Inc.|Apple Computer]] (for the [[Apple Lisa|Lisa]] and [[Mac (computer)|Macintosh]] machines) and [[Borland]] in the late 1980s and later developed into [[Delphi (software)|Delphi]] on the [[Microsoft Windows]] platform. Extensions to the Pascal concepts led to the languages [[Modula-2]] and [[Oberon (programming language)|Oberon]], both developed by Wirth.
 
==History==
Line 61 ⟶ 63:
 
===Pascal===
Pascal was influenced by the ALGOL W efforts, with the explicit goals of teaching programming in a [[structured programming|structured fashion]] and for the development of system software.<ref>{{Cite book|chapter-url=https://link.springer.com/chapter/10.1007/10722581_1|doi = 10.1007/10722581_1|chapter = The Development of Procedural Programming Languages Personal Contributions and Perspectives|title = Modular Programming Languages|series = Lecture Notes in Computer Science|year = 2000|last1 = Wirth|first1 = Niklaus|volume = 1897|pages = 1–10|isbn = 978-3-540-67958-5}}</ref> A generation of students used Pascal as an introductory language in undergraduate courses. Other goals included providing a reliable and efficient tool for writing large programs,<ref>{{cite journal |last1=Wirth |first1=N. |title=The Programming Language Pascal |journal=Acta Informatica |date=1971 |volume=1 |issue=1 |pages=35–63 |doi=10.1007/BF00264291|hdl=20.500.11850/68712 |hdl-access=free }}</ref> and bridging the canyon between scientific and commercial programming, as represented by the then-widespread languages Fortran and COBOL, with a general-purpose language.<ref>{{cite book |last1=Wirth |first1=N. |chapter=Recollections about the development of Pascal |title=History of programming languages---II |date=January 1996 |pages=97–120 |doi=10.1145/234286.1057812|isbn=0-201-89502-1 }}</ref>
A generation of students used Pascal as an introductory language in undergraduate courses.
 
One of the early successes for the language was the introduction of [[UCSD Pascal]], a version that ran on a custom [[operating system]] that could be ported to different platforms. A key platform was the [[Apple II series|Apple II]], where it saw widespread use as [[Apple Pascal]]. This led to Pascal becoming the primary [[high-level language]] used for development in the [[Apple Lisa]], and later, the [[Mac (computer)|Macintosh]]. Parts of the original [[Classic Mac OS|Macintosh operating system]] were hand-translated into [[Motorola 68000]] [[assembly language]] from the Pascal [[source code]].<ref>Hertzfeld, Andy. "[http://www.folklore.org/StoryView.py?project=Macintosh&story=Hungarian.txt&topic=Software%20Design&sortOrder=Sort%20by%20Date&detail=medium Hungarian folklore.org] {{webarchive|url=https://web.archive.org/web/20151118082558/http://www.folklore.org/StoryView.py?project=Macintosh&story=Hungarian.txt&topic=Software%20Design&sortOrder=Sort%20by%20Date&detail=medium |date=2015-11-18}}: Macintosh Stories. Retrieved 2012-03-06.</ref>
 
The [[typesetting]] system [[TeX]] by [[Donald Knuth]] was written in [[WEB]], the original [[literate programming]] system, based on [[Digital Equipment Corporation|DEC]] [[PDP-10]] Pascal. Successful commercial applications like [[Adobe Photoshop]]<ref>https://www.computerhistory.org/atchm/adobe-photoshop-source-code/ {{Webarchive|url=https://web.archive.org/web/20140507131754/http://www.computerhistory.org/atchm/adobe-photoshop-source-code/ |date=2014-05-07}}, Adobe Photoshop Source Code</ref> were written in [[Macintosh Programmer's Workshop]] Pascal, while applications like [[Total Commander]], [[Skype]]<ref>{{cite web |url=https://www.embarcadero.com/products/rad-studio/application-showcase|title=RAD Studio Application Showcase|date=2021-10-29}}</ref> and [[Macromedia Captivate]] were written in Delphi ([[Object Pascal]]). [[Apollo Computer]] used Pascal as the systems programming language for its operating systems beginning in 1980.
Line 73 ⟶ 74:
Wirth's example compiler meant to propagate the language, the Pascal-P system, used a subset of the language designed to be the minimal subset of the language that could compile itself. The idea was that this could allow bootstrapping the compiler, which would then be extended to full Pascal language status. This was done with several compilers, but one notable exception was UCSD Pascal, which was based on Pascal-P2. It kept the subset status of the language based on the idea that this would run better on the new (then) microprocessors with limited memory. UCSD also converted the Pascal-P2 interpreter into a "byte machine", again, because it would be a better fit for byte oriented microprocessors.
 
UCSD Pascal formed the basis of many systems, including Apple Pascal. Borland Pascal was not based on the UCSD codebase, but arrived during the popular period of UCSD and matched many of its features. This started the line that ended with Delphi Pascal and itsthe freewarecompatible version,Open Source compiler FPC/Lazarus.
 
The ISO standard for Pascal, ISO 7185, was published in 1983 and was widely implemented and used on mainframes, minicomputers and IBM-PCs and compatibles from 16 bits to 32 bits. The two dialects of Pascal most in use towards the end of the 20th century and up until today are the ISO 7185 standard version and the Delphi/Turbo Pascal versions (of which the two Borland versions are mostly compatible with each other).
Line 82 ⟶ 83:
 
===Object Pascal===
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|Multimulti-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=dead}}</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]].
Line 88 ⟶ 89:
==Implementations==
 
===Early Pascal compilers===
The first Pascal [[compiler]] was designed in [[Zürich]] for the [[CDC 6000 series]] [[mainframe computer]] family. [[Niklaus Wirth]] reports that a first attempt to implement it in [[Fortran|FORTRAN 66]] in 1969 was unsuccessful due to FORTRAN 66's inadequacy to express complex data structures. The second attempt was implemented in a C-like language (Scallop by Max Engeli) and then translated by hand (by R. Schild) to Pascal itself for boot-strapping.<ref>[https://www.inf.ethz.ch/personal/wirth/Miscellaneous/ComputersAndComputing.pdf Computers and Computing. A Personal Perspective.] {{webarchive|url=https://web.archive.org/web/20170510101203/https://www.inf.ethz.ch/personal/wirth/Miscellaneous/ComputersAndComputing.pdf |date=2017-05-10}} by Niklaus Wirth</ref> It was operational by mid-1970. Many Pascal compilers since have been similarly [[Self-hosting (compilers)|self-hosting]], that is, the compiler is itself written in Pascal, and the compiler is usually capable of recompiling itself when new features are added to the language, or when the compiler is to be [[porting|ported]] to a new environment. The [[GNU Pascal]] compiler is one notable exception, being written in C.
 
Line 95 ⟶ 96:
A completely new compiler was completed by Welsh et al. at QUB in 1977. It offered a source-language diagnostic feature (incorporating profiling, tracing and type-aware formatted postmortem dumps) that was implemented by Findlay and Watt at Glasgow University. This implementation was ported in 1980 to the [[ICL 2900]] series by a team based at [[Southampton University]] and Glasgow University. The Standard Pascal Model Implementation was also based on this compiler, having been adapted, by Welsh and Hay at [[Manchester University]] in 1984, to check rigorously for conformity to the BSI 6192/ISO 7185 Standard and to generate code for a portable abstract machine.
 
The first Pascal [[compiler]] written in North America was constructed at the [[University of Illinois at Urbana–Champaign|University of Illinois]] under [[Donald B. Gillies#Later career|Donald B. Gillies]] for the [[PDP-11]] and generated native machine code. Microsoft had Pascal compilers for IBM PCs, see [[Microsoft Pascal]].
 
==={{anchor|Pascal-P}}The Pascal-P system===
Line 172 ⟶ 173:
|-
| [[Array data type|array]]
| a countable group of any of the preceding data types, orof records, or of other arrays
|-
| [[Record (computer science)|record]]
| A collection of any of the preceding data types or of other records
|-
| [[string (computer science)|string]]
Line 181 ⟶ 182:
|}
 
The range of values allowed for the basic types (except Boolean) is implementation defined. Functions are provided for some data conversions. For conversion of <code>real</code> to <code>integer</code>, the following functions are available: <code>round</code> (whichusing rounds[[Rounding#Rounding_half_away_from_zero|rounding tohalf integeraway usingfrom [[banker's roundingzero]]) and <code>trunc</code> (rounds towards zero).
 
The programmer has the freedom to define other commonly used data types (e.g. byte, string, etc.) in terms of the predefined types using Pascal's type declaration facility, for example
Line 283 ⟶ 284:
end;
c = file of a;
</syntaxhighlight>
 
Further, complex types can be constructed from other complex types recursively:
 
:<syntaxhighlight lang="pascal">
const
Jack = 11;
Queen = 12;
King = 13;
Ace = 14;
 
type
valueType = 2..Ace;
suitType = club, diamond, heart, spade;
 
cardType = record
suit: suitType;
value: valueType;
end;
 
deckType = array [1..52] of cardType;
 
person = record
surname: packed array [1..20] of char;
age: integer;
end;
 
table = record
hands: array [1..3] of deckType;
players: array [1..4] of person;
end;
</syntaxhighlight>
 
Line 387 ⟶ 419:
end;
 
function triple(const x: integer): integer;
begin
triple := x * 3
Line 416 ⟶ 448:
Several Pascal compilers and interpreters are available for general use:
 
* [[Delphi (software)|Delphi]] is Embarcadero's (formerly Borland/CodeGear) flagship [[rapid application development]] (RAD) product. It uses the Object Pascal language (termed 'Delphi' by Borland), descended from Pascal, to create applications for [[Microsoft Windows|Windows]], [[macOS]], [[iOS]], and [[Android (operating system)|Android]]. The [[.NET]] support that existed from D8 through D2005, D2006, and D2007 has been terminated, and replaced by a new language (Prism, which is rebranded Oxygene, see below) that is not fully backward compatible. In recent years [[Unicode]] support and [[Generic programming|generics]] were [[Generic programming#In Delphi|added]] (D2009, D2010, Delphi XE).
* [[Free Pascal]] is a [[Cross-platform software|cross-platform]] compiler written in [[Object Pascal]] (and is [[Self-hosting (compilers)|self-hosting]]). It is aimed at providing a convenient and powerful compiler, both able to compile legacy applications and to be the means to develop new ones. It is distributed under the [[GNU General Public License]] (GNU GPL), while packages and runtime [[Library (computing)|library]] come under a modified [[GNU Lesser General Public License]] (GNU LGPL). In addition to compatibility modes for [[Turbo Pascal]], Delphi, and Mac Pascal, it has its own procedural and object-oriented syntax modes with support for extended features such as [[operator overloading]]. It supports many platforms and operating systems. Current versions also feature an ISO mode.
* [[Turbo51]] is a free Pascal compiler for the [[Intel 8051]] family of microcontrollers, with [[Turbo Pascal]]&nbsp;7 syntax.
* [[Oxygene (programming language)|Oxygene]] (formerly named ''Chrome'') is an Object Pascal compiler for the [[.NET Framework|.NET]] and [[Mono (software)|Mono]] platforms. It was created and is sold by [[RemObjects Software]], and sold for a while by Embarcadero as the backend compiler of [[Delphi Prism|Prism]].
* [[Kylix (software)|Kylix]] was a descendant of [[Delphi (software)|Delphi]], with support for the [[Linux]] operating system and an improved object library. It is no longer supported. Compiler and IDE are available now for non-commercial use.
* [[GNU Pascal]] Compiler (GPC) is the Pascal compiler of the [[GNU Compiler Collection]] (GCC). The compiler is written in C, the runtime library mostly in Pascal. Distributed under the [[GNU General Public License]], it runs on many platforms and operating systems. It supports the ANSI/ISO standard languages and has partial Turbo Pascal dialect support. One of the more notable omissions is the absence of a fully Turbo Pascal-compatible (short)string type. Support for Borland Delphi and other language variants is quite limited. There is some support for Mac-pascal, however.
Line 465 ⟶ 497:
===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|url-status=dead}}</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 ⟶ 525:
* [[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=dead |archive-url=https://web.archive.org/web/20110830023208/http://pascal-central.com/vpascal.html |archive-date=30 August 2011 }}</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 505 ⟶ 537:
 
===Early criticism===
WhileWirth's veryinitial populardefinition inof the 1980slanguage andwas widely criticized. earlyIn 1990sparticular, implementations[[Nico ofHabermann]] commented in his "Critical Comments on the Programming Language Pascal" (1973) that closelymany followedof Wirth'sits initialconstructs definitionwere ofpoorly defined, in particular for [[Data type|data types]], [[Range (computer programming)|ranges]], [[Record (computer science)|structures]], and [[goto]].<ref>{{Cite journal |last=Habermann |first=A. N. |date=1973 |title=Critical comments on the programming language werePascal widely|url=http://dx.doi.org/10.1007/bf00288652 criticized|journal=Acta asInformatica being|volume=3 unsuitable|issue=1 for|pages=47–57 use|doi=10.1007/bf00288652 outside|issn=0001-5903}} teaching([https://kilthub.cmu.edu/articles/Critical_comments_on_the_programming_language_PASCAL/6604568/files/12094973.pdf full text of technical report])</ref> Later, [[Brian Kernighan]], who popularized the [[C (programming language)|C language]], outlined his most notable criticisms of Pascal as early asin 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.{{cite journal |last1=Lecarme, P|first1=O. |last2=Desjardins, "|first2=P. |title=More Commentscomments on the Programmingprogramming Languagelanguage Pascal", ''|journal=Acta Informatica |date=1975 |volume=4'', pp.|issue=3 |pages=231–243 (1975)|doi=10.1007/BF00288728}}</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.
 
===Rising popularity in the 1970s and 1980s===
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=dead |archive-url=https://web.archive.org/web/20151018023934/http://www.pascal-central.com/ppl/chapter3.html |archive-date=2015-10-18}}</ref>
In the two decades after 1975, Pascal gained increasing attention and became a major programming language for important platforms (including Apple II, Apple III, Apple Lisa, Commodore systems, Z-80-based machines and IBM PC) due to the availability of UCSD Pascal and Turbo Pascal.<ref>{{cite web |last1=Crespo |first1=Diego |title=Pascal: The language that almost took over the world part 1 |url=https://www.deusinmachina.net/p/pascal-the-language-that-almost-took?utm_source=publication-search |website=www.deusinmachina.net |access-date=4 January 2025 |language=en}}</ref>
 
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=dead |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 }}</ref>
 
Some of the problems arising from the differences in the implementations of Pascal were later partly solved by the advent of Free Pascal, which supports several dialects with mode directives.<ref>{{cite web |last1=Crespo |first1=Diego |title=Pascal: The language that almost took over the world part 2 |url=https://www.deusinmachina.net/p/pascal-the-language-that-almost-took-56a?utm_source=publication-search |website=www.deusinmachina.net |access-date=4 January 2025 |language=en}}</ref>
 
==Notes==
{{notelist}}
 
==See also==
Line 530 ⟶ 570:
* C. A. R. Hoare: "Notes on data structuring". In O.-J. Dahl, E. W. Dijkstra and C. A. R. Hoare, editors, ''Structured Programming'', pages 83–174. Academic Press, 1972.
* C. A. R. Hoare, Niklaus Wirth: ''An Axiomatic Definition of the Programming Language Pascal''. 335–355, Acta Informatica, Volume 2, 1973.
* Kathleen Jensen and Niklaus Wirth: ''[https://web.archive.org/web/20050314152247/http://www.cs.inf.ethz.ch/~wirth/books/Pascal/ Pascal – User Manual and Report]''. Springer-Verlag, 1974, 1985, 1990, 1991, {{ISBN|0-387-97649-3}} and {{ISBN|3-540-97649-3}}.
* Niklaus Wirth: ''[[Algorithms + Data Structures = Programs]]''. Prentice-Hall, 1975, {{ISBN|0-13-022418-9}}.
* Niklaus Wirth: ''An assessment of the programming language Pascal''. 23–30 ACM SIGPLAN Notices Volume 10, Issue 6, June 1975.
Line 550 ⟶ 590:
[[Category:Academic programming languages]]
[[Category:Systems programming languages]]
[[Category:Articles with example Pascal code]]
[[Category:Educational programming languages]]
[[Category:High-level programming languages]]
Line 556 ⟶ 595:
[[Category:Programming languages with an ISO standard]]
[[Category:1970 software]]
<!-- Hidden categories below -->
[[Category:Articles with example Pascal code]]
[[Category:Compiled programming languages]]