The Skeleton of Every Pascal Program
Every Pascal program has three parts: a heading, a declaration part, and a body.
Program App_1(input, output); { heading }
Const n = 2.5; { declaration part }
Var a, r, b, x: Integer; c: real;
Begin { body }
x := a; r := 10; c := SQR(n);
End.
- The body is always wrapped in
begin ... end, and the program's finalendis terminated with a full stop (end.) — not a semicolon, not a comma. - The only truly optional part is the declaration part — a valid program can have no constants, types, variables, or subprograms declared at all. The heading and body are always required.
- The semicolon (;) is Pascal's statement terminator/separator.
Declaration Order Matters
When a program declares labels, constants, types, variables, and subprograms, they must appear in exactly this order:
Label → Constant → Type → Variable → Subprogram (procedure/function)
Comments
- Block comments:
{ like this }or(* like this *)— both need a matching closing symbol. - Line comments:
// like this— needs no closing symbol; it automatically ends at the end of the line.
Why This Matters for Your Exams
Many questions simply ask "which part is optional" or "what's the correct declaration order" — memorize the Label-Constant-Type-Variable-Subprogram sequence as one phrase and you'll answer several questions at once.

