ISO Pascal reference manual
ISO Pascal reference manual
ISO Pascal reference manual
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
PROGRAM fail;<br />
PROCEDURE Lost; FORWARD;<br />
BEGIN<br />
Lost;<br />
END. (the definition of 'Lost' is missing]<br />
*ERROR 27 -- the bound identifier may not be altered<br />
The identifiers used to represent the actual bounds of a conformant array<br />
parameter are given values each time the procedure or function containing<br />
them is invoked. These values may not be altered by the program.<br />
PROGRAM fail;<br />
VAR a : ARRAY [1..5] OF char;<br />
PROCEDURE p(a : ARRAY [low..high:integer] OF char)<br />
BEGIN<br />
END;<br />
BEGIN<br />
END.<br />
REPEAT<br />
high := high-1; (wrong)<br />
a[high] := 'x';<br />
UNTIL high = low;<br />
p(a);<br />
*ERROR 29 -- a constant is required here<br />
The compiler is expecting a constant of some type.<br />
PROGRAM fail;<br />
CONST nothing = NIL; (NIL is not valid here)<br />
VAR a : +..19; (+ is not a constant)<br />
BEGIN<br />
END.<br />
*ERROR 30 -- an integer value is required here<br />
This message is issued when a machine-code statement is incorrectly<br />
specified. Machine-code is an extension to standard <strong>Pascal</strong>.<br />
54 <strong>Pascal</strong> Issue 1