Pascal
From Wikipedia, the free encyclopedia
For the mathematician, see Blaise Pascal.
For the unit of pressure, see Pascal (unit).
Pascal is a programming language. It was created in 1970 by Niklaus Wirth, to help people learn how to make computer programs.
Now, there are many different dialects of the language, so a Pascal program written for one compiler can not easily be used with another one.
Code samples[change | change source]
This code prints "Hello world" at console window
program helloworld;
begin
WriteLn('Hello World');
end.
This code calculate factorial of positive integer, using recursion.
program fac;
var j:integer;
function fac(i:integer):integer ;
begin
if i=0 then fact:=1 else
fact:=i*fact(i-1);
end ;
begin
WriteLn('Enter number ');
Readln(j);
WriteLn(fac(j));
ReadLn;
end.
Pascal variants[change | change source]
- GNU Pascal
- Free Pascal
- Delphi - Modern IDE for creating GUI programms for Microsoft Windows. There is an open source clone of it for Windows, Mac OS X and FreeBSD, named Lazarus.
- Turbo Pascal

