PASCAL


The programming language Pascal was designed by Swiss computer scientist Niklaus Wirth. It was named after French mathematician and philosopher Blaise Pascal. Wirth began creating the language in 1968, but Pascal's first implementation was released in 1970. Many sources mention it as the year of its creation in 1971. It is a high-level language, but it also provides access to the assembler. In 1983, Borland's Turbo Pascal was introduced, and enjoyed great popularity due to its simplicity of use, reliability and fast compilation and fast boot. Pascal is the internal language of Delphi and Lazarus, IDE's excellent environments, enabling the rapid development of visually appealing applications. Pascal has been and continues to be used primarily for educational purposes, especially for learning structural programming. Pascal runs on various platforms such as Windows, Mac OS and Linux.


   COMPILERS, EDITORS AND PASCAL ENVIRONMENTS

Windows
Turbo Pascal, Borland Pascal, Free Pascal, TMT Pascal Lite, DPascal, Dev-Pascal, Virtual Pascal, Irie Pascal, Hugo, Delphi, Lazarus
Linux
fpc (Free Pascal Compiler), Lazarus

  example of compilation from a console:
    fpc moje.pas
  start-up:
    ./moje


EXAMPLE OF CODE

Program Name;
Uses Crt,Dos,Graph;
Var k: word;
ster,tryb:integer;
Begin
ClrScr;
for k:=1 to 15 do
begin
   TextColor(k);
   Writeln('xxx');
end; Writeln('|ENTER|');
ReadLn;
ster:=Detect;
InitGraph(ster, tryb, '');
ClearDevice;
for k:=1 to 15 do
begin
   SetColor(k);
   OutTextXY(50,40+k*20, 'xxx');
end;
ReadLn;
CloseGraph;
End.

The text with the source program consists of several parts: header, declaration and main one. The header section contains the names of the modules used, in the declaration section descriptions (declarations) of constants and variables used in the programme, and definitions of procedures and functions. The main part contains language instructions.