Skip to content
Hello, Pascal
step 1/5

Reading — step 1 of 5

Learn

~1 min readBasics

Pascal was designed in 1970 by Niklaus Wirth as a language for teaching structured programming. It dominated CS education in the 80s and 90s. Today Free Pascal (FPC) keeps the dialect alive and is what Judge0 uses.

program Hello;
begin
    WriteLn('Hello, Pascal!');
end.

The shape of every Pascal program:

  • program Name; — declares the program (mostly for documentation)
  • begin ... end. — the main block. Note the trailing .
  • Statements end with ; (separator, not terminator — the last end. doesn't need a ;)
  • Strings use single quotes only. Double quotes don't exist.
  • Identifiers are case-insensitive: WriteLn = writeln = WRITELN
  • Comments: { ... } or (* ... *)

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…