Questions Columns Rows
GitHub icon

Pascal

Pascal - Programming language

< >

Pascal is a programming language created in 1970 by Niklaus Wirth.

#29on PLDB 53Years Old 49kRepos

Try now: Riju

Pascal is an imperative and procedural programming language, which Niklaus Wirth designed in 1968–69 and published in 1970, as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named in honor of the French mathematician, philosopher and physicist Blaise Pascal. Pascal was developed on the pattern of the ALGOL 60 language. Read more on Wikipedia...


Example from Compiler Explorer:
unit output; interface function Square(const num: Integer): Integer; implementation // Type your code here, or load an example. function Square(const num: Integer): Integer; begin Square := num * num; end; end.
Example from Riju:
program Main; begin writeln('Hello, world!'); end.
Example from hello-world:
program HelloWorld(output); begin writeln('Hello World'); end.
{Hello World in Pascal} program HelloWorld(output); begin WriteLn('Hello World!'); end.
Example from Linguist:
uses uw27294; var p : procedure; procedure test; begin p:=@test; writeln('OK'); end; procedure global; begin p:=nil; test; p(); end; begin global; uw27294.global; end.
Example from Wikipedia:
program Printing; var i : integer; procedure Print(j : integer); begin ... end; begin { main program } ... Print(i); end.
Pascal Keywords
* + - / := < <= <> = > >= and begin boolean break byte continue div do double else end false if integer longint mod not or repeat shl shortint shr single then true until while word xor

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Stats · Sponsor · Traffic · Traffic Today · Day 267 · feedback@pldb.com · Logout