Back to manual index

:: First Program example:

A the very minimum, every program must use the reserved words program, begin and end. Pascal variables must be announced at the beginning of a program and the reserved word program and before the reserved word begin. Variables must be identified by type. Example:
program FirstProgram;
var VariableA : integer;

begin
  VariableA := 2 + 2;
  writeln(VariableA);
end.