run: 001 PROGRAM RoutineTest (input, output); 002 003 CONST 004 five = 5; 005 006 TYPE 007 enum = (alpha, beta, gamma); 008 arr = ARRAY [1..five] OF real; 009 010 VAR 011 e, k : enum; 012 i, m : integer; 013 a : arr; 014 v, y : real; 015 t : boolean; 016 017 PROCEDURE proc(j, k : integer; VAR x, y, z : real; VAR v : arr; VAR p : boolean; ch : char); 018 019 CONST 020 t = 6; 021 022 VAR 023 i : real; 024 025 BEGIN 026 z := 7*k; 027 x := 3.14; 028 END; 029 030 FUNCTION forwarded(m : integer; VAR t : real) : real; forward; 031 032 BEGIN {RoutineTest} 033 v := 7 + m; 034 END {RoutineTest}. 34 source lines. 0 syntax errors. 0.02 seconds total parsing time. ===== CROSS-REFERENCE TABLE ===== *** PROGRAM routinetest *** Identifier Line numbers Type Specification ---------- ------------ ------------------ a 013 Defined as: variable Scope nesting level: 1 Type form = array, Type id = arr alpha 007 Defined as: enumeration constant Scope nesting level: 1 Type form = enumeration, Type id = enum Value = 0 arr 008 013 017 Defined as: type Scope nesting level: 1 Type form = array, Type id = arr --- INDEX TYPE --- Type form = subrange, Type id = --- Base Type --- Type form = scalar, Type id = integer Range = 1..5 --- ELEMENT TYPE --- Type form = scalar, Type id = real 5 elements beta 007 Defined as: enumeration constant Scope nesting level: 1 Type form = enumeration, Type id = enum Value = 1 e 011 Defined as: variable Scope nesting level: 1 Type form = enumeration, Type id = enum enum 007 011 Defined as: type Scope nesting level: 1 Type form = enumeration, Type id = enum --- Enumeration Constants --- alpha = 0 beta = 1 gamma = 2 five 004 008 Defined as: constant Scope nesting level: 1 Type form = scalar, Type id = integer Value = 5 forwarded Defined as: function Scope nesting level: 1 Type form = scalar, Type id = gamma 007 Defined as: enumeration constant Scope nesting level: 1 Type form = enumeration, Type id = enum Value = 2 i 012 Defined as: variable Scope nesting level: 1 Type form = scalar, Type id = integer input 001 Defined as: program parameter Scope nesting level: 1 k 011 Defined as: variable Scope nesting level: 1 Type form = enumeration, Type id = enum m 012 033 Defined as: variable Scope nesting level: 1 Type form = scalar, Type id = integer output 001 Defined as: program parameter Scope nesting level: 1 proc Defined as: procedure Scope nesting level: 1 t 015 Defined as: variable Scope nesting level: 1 Type form = enumeration, Type id = boolean v 014 033 Defined as: variable Scope nesting level: 1 Type form = scalar, Type id = real y 014 Defined as: variable Scope nesting level: 1 Type form = scalar, Type id = real *** PROCEDURE proc *** Identifier Line numbers Type Specification ---------- ------------ ------------------ ch 017 Defined as: value parameter Scope nesting level: 2 Type form = scalar, Type id = char i 023 Defined as: variable Scope nesting level: 2 Type form = scalar, Type id = real j 017 Defined as: value parameter Scope nesting level: 2 Type form = scalar, Type id = integer k 017 026 Defined as: value parameter Scope nesting level: 2 Type form = scalar, Type id = integer p 017 Defined as: var parameter Scope nesting level: 2 Type form = enumeration, Type id = boolean t 020 Defined as: constant Scope nesting level: 2 Type form = scalar, Type id = integer Value = 6 v 017 Defined as: var parameter Scope nesting level: 2 Type form = array, Type id = arr x 017 027 Defined as: var parameter Scope nesting level: 2 Type form = scalar, Type id = real y 017 Defined as: var parameter Scope nesting level: 2 Type form = scalar, Type id = real z 017 026 Defined as: var parameter Scope nesting level: 2 Type form = scalar, Type id = real *** FUNCTION forwarded *** Identifier Line numbers Type Specification ---------- ------------ ------------------ m 030 Defined as: value parameter Scope nesting level: 2 Type form = scalar, Type id = integer t 030 Defined as: var parameter Scope nesting level: 2 Type form = scalar, Type id = real ===== INTERMEDIATE CODE ===== *** PROGRAM routinetest *** *** PROCEDURE proc *** *** FUNCTION forwarded *** 0 instructions generated. 0.00 seconds total code generation time. BUILD SUCCESSFUL (total time: 0 seconds)