FACTOID # 171: Want to go to the United States? Try going to Albania first. Albania has more U.S visa lottery winners per capita than anywhere else in the world.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Pascal (programming language)

Pascal is a structured imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. A derivative known as Object Pascal was designed for object oriented programming. Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ... In computer science, imperative programming, as opposed to declarative programming, is a programming paradigm that describes computation in terms of a program state and statements that change the program state. ... “Programming” redirects here. ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... Year 1970 (MCMLXX) was a common year starting on Thursday (link shows full calendar) of the Gregorian calendar. ... Niklaus E. Wirth (born February 15, 1934) is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. ... Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ... Object Pascal is an object oriented derivative of Pascal mostly known as the primary programming language of Borland Delphi. ... Object-oriented programming (OOP) is a programming paradigm that uses objects and their interactions to design applications and computer programs. ...

Pascal
Paradigm: imperative, structured
Appeared in: 1970, last revised 1992
Designed by: Niklaus Wirth
Typing discipline: static, strong, safe
Major implementations: CDC 6000, PASCAL-P, PDP-11, PDP-10, IBM System/370, HP, GNU
Dialects: UCSD, Borland, Turbo
Influenced by: ALGOL
Influenced: Modula-2, Ada, Delphi, Chrome, SCAR

Contents

Image File history File links No higher resolution available. ... A programming paradigm is a paradigmatic style of programming (compare with a methodology, which is a paradigmatic style of doing software engineering). ... In computer science, imperative programming, as opposed to declarative programming, is a programming paradigm that describes computation in terms of a program state and statements that change the program state. ... Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ... Niklaus E. Wirth (born February 15, 1934) is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. ... In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact. ... In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact. ... In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact. ... In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact. ... Look up Implementation in Wiktionary, the free dictionary. ... CDC 6000 - family of supercomputers produced by Control Data Corporation. ... The PDP-11 was a 16-bit minicomputer sold by Digital Equipment Corp. ... The PDP-10 was a computer manufactured by Digital Equipment Corporation (DEC) from the late 1960s on; the name stands for Programmed Data Processor model 10. It was the machine that made time-sharing common; it looms large in hacker folklore because of its adoption in the 1970s by many... The IBM System/370 (often: S/370) was a model range of IBM mainframes announced on June 30, 1970 as the successors to the System/360 family. ... HP may refer to: Handley Page Aircraft Company Harry Potter, a series of fantasy novels by British writer J. K. Rowling Hello! Project (H!P), a Japanese pop recording project Hewlett-Packard, a computer and computer peripheral company High Point, North Carolina High potency, a term used in biology, pharmacology... GNU (pronounced ) is a computer operating system composed entirely of free software. ... A dialect of a programming language is a (relatively small) variation or extension of the language that does not change its intrinsic nature. ... UCSD Pascal was a specific implementation of the programming language Pascal which used the p-Code machine architecture. ... Borland Software Corporation is a software company headquartered in Austin, Texas. ... Turbo Pascal 3. ... It has been suggested that ALGOL object code be merged into this article or section. ... Modula-2 is a computer programming language invented by Niklaus Wirth at ETH around 1978, as a successor to Modula, an intermediate language by him. ... Ada is a structured, statically typed imperative computer programming language designed by a team led by Jean Ichbiah of CII Honeywell Bull during 1977–1983. ... Delphi is the primary programming language of Borland Delphi. ... Chrome is a programming language for the Common Language Infrastructure developed by RemObjects Software. ... The subject of this article may not satisfy the notability guideline or one of the following guidelines for inclusion on Wikipedia: Biographies, Books, Companies, Fiction, Music, Neologisms, Numbers, Web content, or several proposals for new guidelines. ...

History

Pascal is based on the ALGOL programming language and named in honor of mathematician and philosopher Blaise Pascal. Wirth subsequently developed Modula-2 and Oberon, languages similar to Pascal. It has been suggested that ALGOL object code be merged into this article or section. ... Blaise Pascal (pronounced ), (June 19, 1623 – August 19, 1662) was a French mathematician, physicist, and religious philosopher. ... Modula-2 is a computer programming language invented by Niklaus Wirth at ETH around 1978, as a successor to Modula, an intermediate language by him. ... Oberon is a reflective programming language created in the late 1980s by Professor Niklaus Wirth (creator of the Pascal, Modula, and Modula-2 programming languages) and his associates at ETHZ in Switzerland. ...


Initially, Pascal was a language intended to teach students structured programming, and generations of students have "cut their teeth" on Pascal as an introductory language in undergraduate courses. Variants of Pascal are still widely used today, for example Free Pascal can be used in both 32 and 64 bit formats, and all types of Pascal programs can be used for both education and software development. Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ... The FreePascal IDE for Linux. ...


Parts of the original Macintosh operating system were hand-translated into Motorola 68000 assembly language from the Pascal code used in the Apple Lisa, and it was the primary high-level language used for development in the early years of the Mac. In addition, the popular typesetting system TeX was written by Donald E. Knuth in WEB, the original literate programming system using Pascal.. The first Macintosh computer, introduced in 1984, upgraded to a 512K Fat Mac. The Macintosh or Mac, is a line of personal computers designed, developed, manufactured, and marketed by Apple Computer. ... The Motorola 68000 is a 32-bit CISC microprocessor core designed and marketed by Freescale Semiconductor (formerly Motorola Semiconductor Products Sector). ... See the terminology section, below, regarding inconsistent use of the terms assembly and assembler. ... The Apple Lisa was a revolutionary personal computer designed at Apple Computer during the early 1980s. ... This article or section is in need of attention from an expert on the subject. ... TeX (IPA: as in Greek, often in English; written with a lowercase e in imitation of the logo) is a typesetting system created by Donald Knuth. ... Donald Knuth Donald Ervin Knuth (born January 10, 1938) is a renowned computer scientist and Professor Emeritus at Stanford University. ... Look up web in Wiktionary, the free dictionary. ... Literate programming is the writing of computer programs primarily for human beings to read, similar to a work of literature; hence the name literate programming. ...


Implementations

The first Pascal compiler was designed in Zurich for the CDC 6000 series mainframe computer family. Niklaus Wirth reports that a first attempt to implement it in Fortran in 1969 was unsuccessful due to Fortran's inadequacy to express complex data structures. The second attempt was formulated in the Pascal language itself and was operational by mid-1970. Many Pascal compilers since have been similarly 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 ported to a new environment. The GNU Pascal compiler is one notable exception, being written in C. A diagram of the operation of a typical multi-language, multi-target compiler. ... Location within Switzerland   Zürich[?] (German pronunciation IPA: ; usually spelled Zurich in English) is the largest city in Switzerland (population: 366,145 in 2004; population of urban area: 1,091,732) and capital of the canton of Zürich. ... CDC 6000 series were a family of mainframe computers manufactured by Control Data Corporation in the 1960s. ... For other uses, see Mainframe. ... Fortran (previously FORTRAN[1]) is a general-purpose[2], procedural,[3] imperative programming language that is especially suited to numeric computation and scientific computing. ... Also: 1969 (Stargate SG-1) episode. ... Year 1970 (MCMLXX) was a common year starting on Thursday (link shows full calendar) of the Gregorian calendar. ... Self-hosting refers to the use of a computer program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. ... In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed (e. ... GNU Pascal (GPC) is a Pascal compiler comprised of a frontend to GCC, similar to the way Fortran and other languages were added to GCC. GNU Pascal is ISO 7185 compatible, and it implements most of the ISO 10206 Extended Pascal standard (according to the manual). ...


The first successful port of the CDC Pascal compiler to another mainframe was completed by Welsh and Quinn at the Queen's University of Belfast in 1972. The target was the ICL 1900 computer. The Queens University of Belfast (QUB) is a university in Belfast, Northern Ireland; the university is often called Queens University Belfast. ... Year 1972 (MCMLXXII) was a leap year starting on Saturday (link will display full calendar) of the Gregorian calendar. ... International Computers Ltd, or ICL, was a large British computer hardware company that operated from 1968 until 2002, when it was renamed Fujitsu Services Limited after its parent company, Fujitsu. ...


The first Pascal compiler written in North America was constructed at the University of Illinois under Donald B. Gillies for the PDP-11 and generated native machine code. Pascal enjoyed great popularity throughout the 1970s and the 1980s. Today, it remains popular mostly as a teaching tool. A diagram of the operation of a typical multi-language, multi-target compiler. ... A Corner of Main Quad The University of Illinois at Urbana-Champaign (UIUC, U of I, or simply Illinois), is the oldest, largest, and most prestigious campus in the University of Illinois system. ... Donald Bruce Gillies (October 15, 1928 - July 17, 1975) was a Canadian mathematician and computer scientist, known for his work in game theory, computer design, and minicomputer programming environments. ... The PDP-11 was a 16-bit minicomputer sold by Digital Equipment Corp. ...


In order to rapidly propagate the language, a compiler "porting kit" was created in Zurich that included a compiler that generated code for a "virtual" stack machine (i.e. code that lends itself to reasonably efficient interpretation), along with an interpreter for that code - the p-code system. Although the p-code was primarily intended to be compiled into true machine code, at least one system, the notable UCSD implementation, utilized it to create the interpretive UCSD p-System. The P-system compilers were termed P1-P4, with P1 being the first version, and P4 being the last. In computer science, an interpreter is a computer program that executes, or performs, instructions written in a computer programming language. ... The UCSD p-System or UCSD Pascal System was a portable highly machine independent operating system developed in 1978 by the Institute for Information Systems of the University of California, San Diego to provide all students with a common operating system that could run on any of the then available...


A version of the P4 compiler, which created native binaries, was released for the IBM System/370 mainframe computer by the Australian Atomic Energy Commission; it was called the "AAEC Pascal Compiler" after the abbreviation of the name of the Commission. A version of P4 from 1975-6 (based on its internal code, it probably should be called "P5") including source and binaries for the compiler and run-time library files for the PDP-10 mainframe may be downloaded from this link. The IBM System/370 (often: S/370) was a model range of IBM mainframes announced on June 30, 1970 as the successors to the System/360 family. ... For other uses, see Mainframe. ... The Australian Atomic Energy Commission (AAEC) was a statutory body of the Australian government. ... Year 1975 (MCMLXXV) was a common year starting on Wednesday (link will display full calendar) of the Gregorian calendar. ... The PDP-10 was a computer manufactured by Digital Equipment Corporation (DEC) from the late 1960s on; the name stands for Programmed Data Processor model 10. It was the machine that made time-sharing common; it looms large in hacker folklore because of its adoption in the 1970s by many...


In the early 1980s, Watcom Pascal was developed, also for the IBM System 370. The 1980s refers to the years from 1980 to 1989. ... Watcom International Corporation was founded in 1981 from the research of the Computer Systems Group at the University of Waterloo, in Waterloo, Ontario, Canada. ... The System/370 is a model range of IBM mainframes introduced in the early 1970s as the successors to the System/360 family. ...


IP Pascal was an implementation of the Pascal programming language using Micropolis DOS, but was moved rapidly to CP/M running on the Z80. IP Pascal is a very embarassing name to say over and over again. ... One of the first Z80 microprocessors manufactured; the date stamp is from June 1976. ...


In the early 1980s, UCSD Pascal was ported to the Apple II and Apple III computers to provide a structured alternative to the BASIC interpreters that came with the machines. The 1980s refers to the years from 1980 to 1989. ... The Apple II was one of the most popular personal computers of the 1980s. ... The Apple III, an early business machine predating the IBM PC The Apple III with an Apple Monitor //. The Apple III, or Apple /// as it was sometimes styled, was the first completely new computer designed by Apple. ... This article is about the programming language. ...


Apple Computer created its own Lisa Pascal for the Lisa Workshop in 1982 and ported this compiler to the Apple Macintosh and MPW in 1985. In 1985 Larry Tesler, in consultation with Niklaus Wirth, defined Object Pascal and these extensions were incorporated in both the Lisa Pascal and Mac Pascal compilers. Macintosh Programmers Workshop or MPW, is a software development environment for the Classic Mac OS, written by Apple Computer. ...


In the 1980s Anders Hejlsberg wrote the Blue Label Pascal compiler for the Nascom-2. A reimplementation of this compiler for the IBM PC was marketed under the names Compas Pascal and PolyPascal before it was acquired by Borland. Renamed to Turbo Pascal it became hugely popular, thanks in part to an aggressive pricing strategy and in part to having one of the first full-screen Integrated development environments. Additionally, it was written and highly optimized entirely in assembly language, making it smaller and faster than much of the competition. In 1986 Anders ported Turbo Pascal to the Macintosh and incorporated Apple's Object Pascal extensions into Turbo Pascal. These extensions were then added back into the PC version of Turbo Pascal for version 5.5. The 1980s refers to the years from 1980 to 1989. ... Anders Hejlsberg (born December 1960[1]) is a prominent Danish software engineer who co-designed several popular and commercially successful programming languages and development tools. ... The Lucas Nascom 1 and 2 were single-board computer kits issued in 1977 and 1979, respectively, based on the Zilog Z80 and including a keyboard and video interface, as well as a serial port that could be used for storing data on a tape cassette using the Kansas City... IBM PC (IBM 5150) with keyboard and green screen monochrome monitor (IBM 5151), running MS-DOS 5. ... Borland Software Corporation is a software company headquartered in Austin, Texas. ... Turbo Pascal 3. ... An integrated development environment (IDE), also known as integrated design environment and integrated debugging environment, is a programming environment that has been packaged as an application program,that assists computer programmers in developing software. ... See the terminology section, below, regarding inconsistent use of the terms assembly and assembler. ... It has been suggested that Memory-footprint be merged into this article or section. ... Year 1986 (MCMLXXXVI) was a common year starting on Wednesday (link displays 1986 Gregorian calendar). ...


The inexpensive Borland compiler had a large influence on the Pascal community that began concentrating mainly on the IBM PC in the late 1980s. Many PC hobbyists in search of a structured replacement for BASIC used this product. It also began adoption by professional developers. Around the same time a number of concepts were imported from C in order to let Pascal programmers use the C-based API of Microsoft Windows directly. These extensions included null-terminated strings, pointer arithmetic, function pointers, an address-of operator and unsafe typecasts. BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... API and Api redirect here. ... Windows redirects here. ... In computer programming and formal language theory, (and other branches of mathematics), a string is an ordered sequence of symbols. ... Pointer arithmetic is a particular arithmetic involving pointers, typical of the C programming language. ... A function pointer is a type of pointer in C, C++, D, and other C-like programming languages. ... In computer science, type conversion or typecasting refers to changing an entity of one data type into another. ...


However, Borland later decided it wanted more elaborate object-oriented features, and started over in Delphi using the Object Pascal draft standard proposed by Apple as a basis. (This Apple draft is still not a formal standard.) Borland also called this Object Pascal in the first Delphi versions, but changed the name to Delphi Programming Language in later versions. The main additions compared to the older OOP extensions were a reference-based object model, virtual constructors and destructors, and properties. There are several other compilers implementing this dialect, see Object Pascal. Object Pascal is an object oriented derivative of Pascal mostly known as the primary programming language of Borland Delphi. ... Apple Inc. ... Object Pascal is an object oriented derivative of Pascal mostly known as the primary programming language of Borland Delphi. ... Object Pascal is an object oriented derivative of Pascal mostly known as the primary programming language of Borland Delphi. ...


Turbo Pascal, and other derivatives with units or module concepts are modular languages. However, it does not provide a nested module concept or qualified import and export of specific symbols. Turbo Pascal 3. ... Modularity is a concept that has applications in the contexts of computer science, particularly programming, as well as cognitive science in investigating the structure of mind. ...


Super Pascal was a variant which added non-numeric labels, a return statement and expressions as names of types.


The universities of Zurich, Karlsruhe and Wuppertal have developed an EXtension for Scientific Computing (Pascal XSC) based on Oberon, which provides a free solution for programming numerical computations with controlled precision. Location within Switzerland   Zürich[?] (German pronunciation IPA: ; usually spelled Zurich in English) is the largest city in Switzerland (population: 366,145 in 2004; population of urban area: 1,091,732) and capital of the canton of Zürich. ... Karlsruhe (population 285,812 in 2006) is a city in the south west of Germany, in the Bundesland Baden-Württemberg, located near the French-German border. ... Wuppertal university Wuppertal is a city in North Rhine-Westphalia, Germany. ...


In 2005, at the Web 2.0 conference, Morfik Technology introduced a tool which allowed the development of Web applications entirely written in Morfik Pascal. Morfik Pascal is a dialect of Object Pascal, very close to Delphi. Year 2005 (MMV) was a common year starting on Saturday (link displays full calendar) of the Gregorian calendar. ... Morfik Technology Pty Ltd. ...


Language constructs

Pascal, in its original form, is a purely procedural language and includes the traditional array of Algol-like control structures with reserved words such as if, then, else, while, for, and so on. However, pascal also has many data structuring facilities and other abstractions which were not included in the original Algol60, like type definitions, records, pointers, enumerations, and sets. Such constructs were in part inherited or inspired from Simula67, Algol68, and Niklaus Wirth's own AlgolW. Procedural programming is a programming paradigm based upon the concept of the modularity and scope of program code (i. ... ... In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact. ... This article is about the data structure. ... It has been suggested that Software pointer be merged into this article or section. ... In computer programming, an enumerated type is a data type whose set of values is a finite list of identifiers chosen by the programmer. ... In mathematics, a set can be thought of as any collection of distinct objects considered as a whole. ... Simula introduced the object-oriented programming paradigm and thus can be considered the first object-oriented programming language and a predecessor to Smalltalk, C++, Java, and all modern class-based object-oriented languages. ... ALGOL 68 was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and a more rigorously defined syntax and semantics. ... Niklaus E. Wirth (born February 15, 1934) is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. ... Algol-W is a programming language. ...


A syntactical comparison with C

Syntactically, Pascal is distinguished from languages in the C family by being much more Algol-like. English keywords are retained where C uses punctuation symbols — pascal has and, or, and mod where C uses &&, ||, and % for example. However, C is actually more Algol-like than Pascal regarding (simple) declarations, retaining the type-name variable-name syntax which Pascal abandoned to allow for (easily read) complex type expressions and a better perceived clarity in educational situations. C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ...


Another, more subtle, difference is the role of the semicolon. In Pascal semicolons separate individual statements within a compound statement whereas, in C, they are syntactically part of the statement itself (transforming an expression into a statement). This difference manifests itself primarily in two situations: A semicolon (  ;  ) is a punctuation mark. ...

  • there can never be a semicolon directly before else in Pascal whereas it is mandatory in C (unless a block statement is used)
  • the last statement before an end is not required to be followed by a semicolon

Some programmers nevertheless put a semicolon on the last line before end, thereby formally inserting an empty statement. This is discouraged by some educators, worried that it may confuse students' perception of the formal role of the semicolon.


Hello world

Pascal programs start with the program keyword, an optional list of external file descriptors and then a statement block is indicated with the begin and end keywords. Semicolons separate statements, and the full stop ends the program (or unit). Letter case is ignored in Pascal source. Some compilers (Turbo Pascal among them) have made the program keyword optional. In computer programming, a keyword is a word or identifier that has a particular meaning to the programming language. ... In computer programming, a statement block (or code block) is a section of code which is grouped together, much like a paragraph; such blocks consist of one, or more, statements. ... A semicolon (  ;  ) is a punctuation mark. ... For other uses, see Full stop (disambiguation). ... In orthography and typography, letter case (or just case) is the distinction between majuscule (capital or upper-case) and minuscule (lower-case) letters. ...


Here is an example of the source code in use for a very simple program:

 program HelloWorld(output); begin writeln('Hello, World!') end. 

Data structures

Pascal's simple (atomic) types are real, integer, character, boolean and enumerations, a new type constructor introduced with Pascal: A floating-point number is a digital representation for a number in a certain subset of the rational numbers, and is often used to approximate an arbitrary real number on a computer. ... In computer science, the term integer is used to refer to any data type which can represent some subset of the mathematical integers. ... In computer science the boolean datatype, sometimes called the logical datatype, is a primitive datatype having two values: one and zero (sometimes called true and false). ... In computer programming, an enumerated type is a data type whose set of values is a finite list of identifiers chosen by the programmer. ...

 var r: Real; i: Integer; c: Char; b: Boolean; e: (apple, pear, banana, orange, lemon); 

Subranges of any ordinal type (any simple type except real) can be made:

 var x: 1..10; y: 'a'..'z'; z: pear..orange; 

Types can be defined from other types using type declarations:

 type x = Integer; y = x; ... 

Further, complex types can be constructed from simple types:

 type a = Array [1..10] of Integer; b = record a: Integer; b: Char end; c = File of a; 

As shown in the example above, Pascal files are sequences of components. Every file has a buffer variable which is denoted by f^. The procedures get (for reading) and put (for writing) move the buffer variable to the next element. Read is introduced such that read(f, x) is the same as x:=f^; get(f);. Write is introduced such that write(f, x) is the same as f^ := x; put(f); The type text is predefined as file of char. While the buffer variable could be used to inspect the next character that would be used (check for a digit before reading an integer), this concept leads to serious problems with interactive programs. Pascal 6000 and VAX Pascal had incompatible solutions for this problem and most other implementations omit the get and put procedures. A computer file is a collection of information that is stored in a computer system and can be identified by its full path name. ...


In Jensen & Wirth Pascal, strings are represented as packed arrays of chars; they therefore have fixed length and are usually space-padded. Later dialects commonly add a string type where the length of the contents can vary up to a declared maximum length. These are usually implemented by a length byte (limiting the maximum length to 255) and a fixed array of payload characters, and are therefore space-inefficient if the maximal length is seldom used in practice.


Pointers

Pascal supports the use of pointers: It has been suggested that Software pointer be merged into this article or section. ...

 type a = ^b; b = record a: Integer; b: Char; c: a end; var pointer_to_b: a; 

Here the variable pointer_to_b is a pointer to the data type b, a record. To create a new record and assign the values 10 and A to the fields a and b in the record, the commands would be;

 new(pointer_to_b); 
 pointer_to_b^.a := 10; pointer_to_b^.b := 'A'; pointer_to_b^.c := nil; ... 

This could also be done using the with statement, as follows

 new(pointer_to_b); with pointer_to_b^ do begin a := 10; b := 'A'; c := nil end; ... 

Note that inside of the scope of the with statement, the compiler knows that a and b refer to the subfields of the record pointer pointer_to_b and not to the record b or the pointer type a.


Linked lists, stacks and queues can be created by including a pointer type field (c) in the record (see also nil and null (computer)). In computer science, a linked list is one of the fundamental data structures, and can be used to implement other data structures. ... Simple representation of a stack In computer science, a stack is a temporary abstract data type and data structure based on the principle of Last In First Out (LIFO). ... A queue (pronounced /kuː/) is a particular kind of collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position and removal of entities from the front terminal position. ... Look up nil in Wiktionary, the free dictionary. ... In computer programming, null is a special value for a pointer (or other kind of reference) used to signify that the pointer intentionally does not have a target. ...


Control structures

Pascal is a structured programming language, meaning that the flow of control is structured into standard statements, ideally without 'go to' commands. Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. ... GOTO is a command found in many programming languages which instructs the computer to jump to another point in the computer program, specified by a label or line number. ...

 while a <> b do writeln('Waiting'); if a > b then writeln('Condition met') else writeln('Condition false'); for i := 1 to 10 do writeln('Iteration: ', i:1); repeat a := a + 1 until a = 10; 

Procedures and functions

Pascal structures programs into procedures and functions.

 program mine(output); var i : integer; procedure print(var j: integer); function next(k: integer): integer; begin next := k + 1 end; begin writeln('The total is: ', j); j := next(j) end; begin i := 1; while i <= 10 do print(i) end. 

Procedures and functions can nest to any depth, and the 'program' construct is the logical outermost block.


Each procedure or function can have its own declarations of goto labels, constants, types, variables, and other procedures and functions, which must all be in that order. This ordering requirement was originally intended to allow efficient single-pass compilation. However, in most modern dialects the strict ordering requirement of declaration sections has been abandoned.


Resources

Compilers

Several Pascal compilers are available for the use of general public:

  • Delphi is Borland's flagship RAD (Rapid Application Development) product. It uses the Object Pascal language (Dubbed the 'Delphi programming language' by Borland), descended from Pascal, to create applications for the windows platform. The latest versions 2005 and 2006 also support compiling to the .NET platform. A version of Delphi, Turbo Delphi Explorer, is available for free download.
  • Free Pascal (www.freepascal.org) is a multi-platform compiler written in Pascal (it is Self-hosting). It is aimed at providing a convenient and powerful compiler, both able to compile legacy applications and to be the means of developing new ones. It is distributed under the GNU GPL. Apart from compatibility modes for Turbo Pascal, Delphi and Mac Pascal, it also 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.
  • Dev-Pas (Dev-Pascal) is a Pascal IDE that was designed in Borland Delphi and which supports both Free Pascal and GNU Pascal as backend. Contrary to its C++ sibling, it has not seen a significant release in years
  • Chrome (Chrome programming language) (website: www.chromesville.com) is a next generation Visual Studio plugin and stand-alone (in the .NET environment only) compiler for the Object Pascal language with the .NET and Mono Platforms. It was created and is sold by RemObjects Software.
  • Kylix is Borland's newest reiteration of the Pascal branch of their products. It is the descendant of Delphi, with support for the Linux operating system and an improved object library. The compiler and the IDE are available now for non-commercial use. The product is currently no longer supported by Borland.
  • GNU Pascal Compiler (GPC) is the Pascal compiler of the GNU Compiler Collection (GCC). The compiler itself is written in C, the runtime library mostly in Pascal. Distributed freely under the GNU General Public License, it runs on many platforms and operating systems. It supports the ANSI/ISO standard languages and partial Borland/Turbo Pascal language support. One of the more painful omissions is the absence of a 100% TP compatible string type. Support for Borland Delphi and other language variations is quite limited, except maybe for Mac Pascal, the support for which is growing fast.
  • Virtual Pascal was created by Vitaly Miryanov in 1995 as a native OS/2 compiler compatible with Borland Pascal syntax. Then, it had been commercially developed by fPrint, adding Win32 support, and in 2000 it became freeware. Today it can compile for Win32, OS/2 and Linux, and is mostly compatible with Borland Pascal and Delphi. Development on this compiler was canceled on April 4, 2005.
  • P4 compiler, the basis for many subsequent Pascal-implemented-in-Pascal compilers, including the UCSD p-System.
  • Turbo Pascal was the dominant Pascal compiler for PCs during the 80s and early 90s, popular both because of its powerful extensions and extremely low compilation times. Turbo Pascal was compactly written and could compile, run, and debug all from memory without accessing disk. Slow floppy disk drives were common for programmers at the time, further magnifying Turbo Pascal's speed advantage. Currently, older versions of Turbo Pascal (up to 5.5) are available for free download from Borland's site.
  • Dr. Pascal is an interpreter that runs Standard Pascal. Notable are the "visible execution" mode that shows a running program and its variables, and the extensive runtime error checking. Runs programs but does not produce a separate executable binary. Runs on MS-DOS, Windows in DOS window, and old Macintosh.
  • IP Pascal Originally a Z80/CP/M Pascal that was ported and recoded for Intel 80386/PC, IP Pascal has a built-in portability library that is custom tailored to the Pascal language. For example, a standard text output application from 1970's original Pascal can be recompiled to work in a window and even have graphical constructs added. IP Pascal supports the ISO 7185 standard and upgrades the language logically. For example, original Pascal "padded right" strings are supported and integrated upwards seamlessly into dynamic strings. Standard Pascal static arrays are enhanced with dynamic arrays which are fully downward compatible with static arrays, etc.
  • Pocket Studio is a Pascal subset compiler/RAD targeting Palm / MC68xxx with some own extensions to assist interfacing with the Palm OS API.
  • MIDletPascal - A Pascal compiler and IDE that generates small and fast Java bytecode specifically designed to create software for mobiles
  • Vector Pascal Vector Pascal is a language targeted at SIMD instruction sets such as the MMX and the AMD 3d Now, supporting all Intel and AMD processors, as well as the Sony Playstation 2 Emotion Engine.
  • Morfik Pascal allows the development of Web applications entirely written in Object Pascal (both server and browser side).
  • web Pascal (www.codeide.com) is an online IDE and Pascal compiler.
  • WDSibyl - Visual Development Environment and Pascal compiler for Win32 and OS/2

A very extensive list can be found on Pascaland. The site is in French, but it is basically a list with URLs to compilers; there is little barrier for non-Francophones. The site, Pascal Central, a Mac centric Pascal info and advocacy site with a rich collection of article archives, plus links to many compilers and tutorials, may also be of interest. Rapid application development (RAD), is a software development process developed initially by James Martin in the 1980s. ... Delphi is the primary programming language of Borland Delphi. ... It has been suggested that Com interop be merged into this article or section. ... The FreePascal IDE for Linux. ... Self-hosting refers to the use of a computer program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. ... GPL redirects here. ... An integrated development environment (IDE), also known as integrated design environment and integrated debugging environment, is a programming environment that has been packaged as an application program,that assists computer programmers in developing software. ... Delphi has been released in many versions, including older versions which have been released in magazines for non-profit application use For the language Borland Delphi is programmed in, see Object Pascal. ... Chrome is a programming language for the Common Language Infrastructure developed by RemObjects Software. ... Object Pascal is an object oriented derivative of Pascal mostly known as the primary programming language of Borland Delphi. ... It has been suggested that Com interop be merged into this article or section. ... Mono is a project led by Novell (formerly by Ximian) to create an Ecma standard compliant . ... Delphi is the primary programming language of Borland Delphi. ... This article is about operating systems that use the Linux kernel. ... GNU Pascal (GPC) is a Pascal compiler comprised of a frontend to GCC, similar to the way Fortran and other languages were added to GCC. GNU Pascal is ISO 7185 compatible, and it implements most of the ISO 10206 Extended Pascal standard (according to the manual). ... The GNU Compiler Collection (usually shortened to GCC) is a set of programming language compilers produced by the GNU Project. ... The GNU logo The GNU General Public License (GNU GPL or simply GPL) is a widely-used free software license, originally written by Richard Stallman for the GNU project. ... Virtual Pascal is a free 32-bit Pascal compiler, IDE and debugger for OS/2 and Windows, with some limited Linux support. ... is the 94th day of the year (95th in leap years) in the Gregorian calendar. ... Year 2005 (MMV) was a common year starting on Saturday (link displays full calendar) of the Gregorian calendar. ... The UCSD p-System or UCSD Pascal System was a portable highly machine independent operating system developed in 1978 by the Institute for Information Systems of the University of California, San Diego to provide all students with a common operating system that could run on any of the then available... Turbo Pascal 3. ... MIDletPascal is a Pascal compiler and IDE specifically designed to create software for mobiles. ... -1...


Standards

In 1983, the language was standardized, in the international standard ISO/IEC 7185, as well as several local country specific standards, including the American ANSI/IEEE770X3.97-1983. In 1990, an extended Pascal standard was created as ISO/IEC 10206. Year 1983 (MCMLXXXIII) was a common year starting on Saturday (link displays the 1983 Gregorian calendar). ... Year 1990 (MCMXC) was a common year starting on Monday (link displays the 1990 Gregorian calendar). ...


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. Pascal is a structured imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ... Year 1974 (MCMLXXIV) was a common year starting on Tuesday (link will display full calendar) of the 1974 Gregorian calendar. ...


Note that Niklaus Wirth himself referred to the 1974 language as "the Standard", for example, to differentiate it from the machine specific features of the CDC 6000 compiler. Year 1974 (MCMLXXIV) was a common year starting on Tuesday (link will display full calendar) of the 1974 Gregorian calendar. ... CDC 6000 - family of supercomputers produced by Control Data Corporation. ...


On the large machines (mainframes and minicomputers) Pascal originated on, the standards were generally followed. On the IBM-PC, they were not. On IBM-PCs, the Borland standards Turbo Pascal and Delphi have the greatest number of users. Thus, it is typically important to understand whether a particular implementation corresponds to the original Pascal language, or a Borland dialect of it.


Divisions

Niklaus Wirth's Zurich version of Pascal was issued outside of ETH in two basic forms, the CDC 6000 compiler source, and a porting kit called Pascal-P system. The Pascal-P compiler left several features of the full language out. For example, procedures and functions as parameters, undiscriminated variant records, packing, dispose, interprocedural gotos and other features of the full compiler were left off.


UCSD Pascal, under professor Kenneth Bowles, used the Pascal-P2 kit, and consequentially had several of the same differences with the full Zurich Pascal compiler as the Pascal-P compiler did. UCSD Pascal later was adopted as Apple Pascal, and continued through several versions there. UCSD Pascal was a specific implementation of the programming language Pascal which used the p-Code machine architecture. ...


Borland's Turbo Pascal, written by Anders Hejlsberg was written in assembly language independent of UCSD or the Zurich compilers. However, it adopted much of the same subset as the UCSD compiler, probably because at that time, UCSD was the most common Pascal system running on Microprocessors. Turbo Pascal 3. ... Anders Hejlsberg (born December 1960[1]) is a prominent Danish software engineer who co-designed several popular and commercially successful programming languages and development tools. ...


ISO Extended Pascal

ISO accepted a modification by the JPC, BSI, and SPARC to the Pascal language, called Extended Pascal, defined as ISO 10206. It adds, among other features: JPC can stand for: Joseph Priestly College Jesmond Parish Church Joint Parliamentary Committee, India JPC, a famous underground Emcee known for his freestyling and poor audio quality yet critically acclaimed lyrics Category: ... BSI is a three letter acronym that can stand for: The Bible Society of India British Standards Institution Bundesamt für Sicherheit in der Informationstechnik, the German Federal Office for Information Security Basic Systems Inc. ... Sun UltraSPARC II Microprocessor Sun UltraSPARC T1 (Niagara 8 Core) SPARC (Scalable Processor Architecture) is a RISC microprocessor instruction set architecture originally designed in 1985 by Sun Microsystems. ... Pascal is a structured imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ...

  • Modular programming
  • Better string handling
  • Constant expressions
  • Complex numbers
  • External file access (by using a feature called "binding"):
 PROGRAM WriteFile(INPUT, OUTPUT) VAR F : TEXT B : BINDINGTYPE; BEGIN WRITELN('Enter filename: '); READLN(B.NAME); { BINDINGTYPE is standard, it has a standard field NAME } BIND(F, B); REWIND(F); WHILE NOT EOF(F) DO PUT(F, GET(F)); UNBIND(F); END. 

(source: ISO 10206) The standard is publicly available. Modular Programming is a programming paradigm that was first presented by Information & Systems Institute, Inc. ...


Reception

Criticism

While very popular (although more so in the 1980s and early 1990s than now), early versions of Pascal have been widely criticised for being unsuitable for "serious" use outside of teaching. Brian Kernighan, famed popularizer of the C programming language, outlined his most notable criticisms of Pascal as early as 1981, in his paper Why Pascal Is Not My Favorite Programming Language. On the other hand, many major development efforts in the 1980s, such as for the Apple Lisa and Macintosh, heavily depended on Pascal (to the point where the C interface for the Macintosh operating system API had to deal in Pascal data types). Brian Wilson Kernighan (IPA pronunciation: , the g is silent), (born 1942 in Toronto, Ontario, Canada) is a computer scientist who worked at Bell Labs alongside Unix creators Ken Thompson and Dennis Ritchie and contributed greatly to Unix and its school of thought. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... The Apple Lisa was a revolutionary personal computer designed at Apple Computer during the early 1980s. ... The first Macintosh computer, introduced in 1984, upgraded to a 512K Fat Mac. The Macintosh or Mac, is a line of personal computers designed, developed, manufactured, and marketed by Apple Computer. ...


In the decades since then, Pascal has continued to evolve and most of Kernighan's points do not apply to current implementations. Unfortunately, just as Kernighan predicted in his article, most of the extensions to fix these issues were incompatible from compiler to compiler. In the last decade, however, the varieties seem to have condensed into two categories, ISO and Borland like, a better eventual outcome than Kernighan foresaw.


Based on his experience with Pascal (and earlier with ALGOL) Niklaus Wirth developed several more programming languages: Modula, Modula-2 and Oberon. These languages address some criticisms of Pascal, are intended for different user populations, and so on, but none has had the widespread impact on computer science and computer users as has Pascal, nor has any yet met with similar commercial success. Niklaus E. Wirth (born February 15, 1934) is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. ... In the mid-1970s, after designing the Pascal programming language, Niklaus Wirth began experimenting with program concurrency and modularization, which led to the design of the Modula programming language. ... Modula-2 is a computer programming language invented by Niklaus Wirth at ETH around 1978, as a successor to Modula, an intermediate language by him. ... Oberon is a reflective programming language created in the late 1980s by Professor Niklaus Wirth (creator of the Pascal, Modula, and Modula-2 programming languages) and his associates at ETHZ in Switzerland. ...


Praise

Beginning Programming for Dummies, 3rd edition (2004), in a comparison between Pascal and BASIC, praised Pascal as a learning tool:

The main difference between BASIC and Pascal is that Pascal encourages you to write well-structured programs that you can easily read, understand, and modify at a later date.


Compared with Pascal, BASIC is much less structured, which makes writing a BASIC program easy but makes reading and understanding large BASIC programs much more difficult. Pascal is more structured and forces you to plan your program before you write, as you do if you first plan a trip before leaving home. This planning may take longer, but your program and your trip will be more organized than if you rush into writing the program right away, which can be as disorganized as showing up in Paris in the middle of the night with no hotel reservations. On the other hand, BASIC enables you to start writing your program right away, which is more likely to lead to a more disorganized program.

In the early 1980s, the Educational Testing Service, the company that creates the primary college entrance exam in the United States, added a Computer Service exam to the placement exams taken by high-school students. The computer language chosen was Pascal (and remained the language of choice until 1999). This article or section does not cite any references or sources. ...


Pascal is best known for its high performance with structured programming techniques. Another feature of Pascal is that it highlights concepts that are similar to all computer languages. So, learning Pascal makes the learning of other languages easier. Also, Pascal uses standardized language, which makes the writing of programs less arduous.


See also

Wikibooks
Wikibooks has more about this subject:
Programming:Pascal

Image File history File links Wikibooks-logo-en. ... It has been suggested that ALGOL object code be merged into this article or section. ... Ada is a structured, statically typed imperative computer programming language designed by a team led by Jean Ichbiah of CII Honeywell Bull during 1977–1983. ... Delphi is the primary programming language of Borland Delphi. ... In the mid-1970s, after designing the Pascal programming language, Niklaus Wirth began experimenting with program concurrency and modularization, which led to the design of the Modula programming language. ... Modula-2 is a computer programming language invented by Niklaus Wirth at ETH around 1978, as a successor to Modula, an intermediate language by him. ... Oberon is a reflective programming language created in the late 1980s by Professor Niklaus Wirth (creator of the Pascal, Modula, and Modula-2 programming languages) and his associates at ETHZ in Switzerland. ... Object Pascal is an object oriented derivative of Pascal mostly known as the primary programming language of Borland Delphi. ... IP Pascal is a very embarassing name to say over and over again. ... Chrome is a programming language for the Common Language Infrastructure developed by RemObjects Software. ... Concurrent Pascal was designed by Per Brinch Hansen for writing concurrent programs such as operating systems and real-time monitoring systems on shared-memory computers. ... // C vs Pascal: A language comparison C and Pascal are both arguably descendants of the ALGOL programming language series. ... C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... The following is a comparison of integrated development environments and GUI builders. ...

Further reading

  • Kathleen Jensen and Niklaus Wirth: PASCAL - User Manual and Report. Springer-Verlag, 1974, 1985, 1991, ISBN 0-387-97649-3 and ISBN 3-540-97649-3[1]
  • N. Wirth, and A. I. Wasserman, ed: Programming Language Design. IEEE Computer Society Press, 1980
  • Niklaus Wirth: The Programming Language Pascal. Acta Informatica, 1, (Jun 1971) 35-63

External links

  • learn Pascal online (www.codeide.com) is online IDE and Pascal compiler.
  • The Pascal Programming Language
  • How To Code: Pascal
  • Learn Pascal Tutorial
  • Learn Pascal Programming
  • Free online Pascal book
  • Pascal Central — the one-stop Pascal resource site
  • Standard Pascal — Resources and history of original, standard Pascal
  • PASCAL XSC — The page of the developers of Pascal XSC with extensive material
  • SWAG SourceWare Archive Group — collection of source code and program examples for the Pascal programming language
  • Turbo-Pascal — free turbo pascal site
  • Morfik Pascal — Pascal programming for Web applications (both server and browser side)
  • Pascal standards ISO/IEC 10206: Extended Pascal
  • ANSI-ISO Pascal ISO/IEC 7185: PASCAL
  • N. Wirth, M. Broy, ed, and E. Denert, ed: Pascal and its Successors in Software Pioneers: Contributions to Software Engineering. Springer-Verlag, 2002, ISBN 3-540-43081-4
  • N. Wirth: Recollections about the Development of Pascal. ACM SIGPLAN Notices, Volume 28, No 3, March 1993.
  • Pascal User's Group Newsletters — An early Pascal history resource that contains many letters from Wirth and others concerning Pascal.
  • Brian W. Kernighan, Why Pascal is Not My Favorite Programming Language
  • Real Programmers Don't Use Pascal — a joke about why real programmers don't use Pascal

  Results from FactBites:
 
The Pascal Programming Language (0 words)
This class stressed that the art of programming was not the learning of a programming language, but the thought process of taking real-life problems, finding a solution, translating that solution to an algorithm, and finally converting the algorithm into working code.
In 1650, Pascal left the world of geometry and physics, and shifted his focus towards religious studies, or, as Pascal wrote, to "contemplate the greatness and the misery of man." Pascal died in Paris on August 19, 1662.
According to the Pascal Standard (ISO 7185), these goals were to a) make available a language suitable for teaching programming as a systematic discipline based on fundamental concepts clearly and naturally reflected by the language, and b) to define a language whose implementations could be both reliable and efficient on then-available computers.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.