CONST Pi = 3.14; (* REAL *) Maxsize = 30; (* INTEGER *) Space = ' '; (* CHAR *) TYPE Index = [1..Maxsize]; (* Subrange *) Letters = ['a'..'z']; (* Subrange *) Colors = {Red, Green, Blue, Yellow}; (* Enumerated *) ArrType = ARRAY Colors OF INTEGER; (* ARRAY *) ArrType2 = ARRAY [1..5] OF CHAR; (* ARRAY *) SetType = SET OF Letters; (* SET *) Ptr = REF Student; (* Pointer *) Student = RECORD (* RECORD *) name : TEXT; id : INTEGER; gpa : REAL; next : Ptr; END; VAR n : INTEGER := -15; (* INTEGER *) nonneg : CARDINAL := 5; (* CARDINAL *) x : REAL := 3.0; (* REAL *) ch : CHAR := 'Q'; (* CHAR *) done : BOOLEAN := TRUE; (* BOOLEAN *) str : TEXT := "Test"; (* TEXT *) arr : ArrType := ArrType{0,1,2,3}; (* ARRAY *) arr2 : ArrType2 := ArrType2{' ', ..}; (* ARRAY *) inFile : Rd.T; (* Reader *) outFile : Wr.T; (* Writer *) ltrSet : SetType := SetType{'a'..'d','z'}; (* SET *) head : Ptr := NIL (* Pointer *) st : Student (* RECORD *) := Student{"Joe", 15426, 3.35, NIL}; PROCEDURE One (y: REAL; VAR c: ArrType; x: INTEGER := 5) = (* Sample procedure definition. y is a value parameter; c is a variable parameter; x is a value parameter with a default value *) VAR i: INTEGER; (* local var *) BEGIN (* procedure body *) statement-1; ... statement-n; END One; PROCEDURE Max(a, b: INTEGER): INTEGER = (* Sample function definition. *) VAR max: INTEGER; BEGIN max := a; IF a < b THEN max := b END; RETURN max; END Max;