Content deleted Content added
No edit summary |
m caps |
||
Line 159:
| floating-point numbers
|-
| [[
| the values True or False
|-
Line 166:
|-
| [[set (computer science)|set]]
| equivalent to an array of [[
|-
| [[Array data type|array]]
Line 178:
|}
The range of values allowed for the basic types (except
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 502:
===Early criticism===
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
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
==See also==
|