PROGRAM Initial_State_1(INPUT,OUTPUT); { The initial state mechanism allows the specification } { of initial values for variables. These variables can} { be at the outer-level (PROGRAM/MODULE level) or } { nested in PROCEDUREs/FUNCTIONs. When used on stack } { variables in nested routines, the compiler generates } { the code to automatically initialize the variable. } { The value specified for the initial state must be a } { compile-time expression that is assignment compatible} { with the type. } VAR I : REAL VALUE 3.1415; PROCEDURE Nested_Proc; VAR J : INTEGER VALUE 42; BEGIN J := J + 1; WRITELN(J); END; BEGIN WRITELN(I); Nested_Proc; Nested_Proc; END.