Pascal Programming Language Article Index for
Pascal
Website Links For
Pascal
 

Information About

Pascal Programming Language





Programming Information

  Name Pascal
  Paradigm Imperative , Structured
  Typing Static , Strong , Safe
  Implementations CDC 6000 , PASCAL-P , PDP-11 , PDP-10 , IBM System/370 , HP , GNU
  Dialects UCSD , Borland , Turbo
  Year 1970, last revised 1992
  Designer Niklaus Wirth
  Influenced By ALGOL
  Influenced Modula-2 , Ada , Delphi , Chrome , SCAR



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.

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.

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.


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.

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 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.

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.

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 .

In the early 1980s , Watcom Pascal was developed, also for the IBM System 370 .

IP Pascal was an implementation of the Pascal programming language using Micropolis DOS, but was moved rapidly to CP/M running on the Z80 .

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.

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.

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 Environment s. 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 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 String s, Pointer Arithmetic , Function Pointer s, an address-of operator and unsafe Typecasts .

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 .

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.

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 '''S'''cientific '''C'''omputing'' (Pascal XSC) based on Oberon, which provides a free solution for programming numerical computations with controlled precision.

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.


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 , Record s, Pointer s, Enumeration s, and Set s. Such constructs were in part inherited or inspired from Simula67 , Algol68 , and Niklaus Wirth 's own AlgolW .


A syntactical comparison with C