28.06.2013 Views

ISO Pascal reference manual

ISO Pascal reference manual

ISO Pascal reference manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

*ERROR 37 -- the value is out of range<br />

Appendix A<br />

This message is issued when it is obvious to the compiler that PRED or<br />

SUCC must return a value which is outside the range of the parameter type.<br />

< number > will be replaced by the ordinal value of the erroneous quantity.<br />

PROGRAM fail;<br />

VAR n : (one, two, three);<br />

BEGIN<br />

END.<br />

n := SUCC(three); [three is too big for SUCC]<br />

*ERROR 38 -- more values are required here<br />

This error is issued when a list of constants used to initialise a STATIC or<br />

EXPORT array does not contain enough values. The list must provide one<br />

value for each element of the array. STATIC and EXPORT are extensions<br />

to standard <strong>Pascal</strong>.<br />

PROGRAM fail; [needs the EXTEND option]<br />

STATIC a : ARRAY[1..6] of integer := 1,22,333,4444,5555;<br />

BEGIN<br />

END.<br />

*ERROR 39 -- a record field identifier is required here<br />

A record selector (.) has been followed by something which is not an<br />

identifier.<br />

PROGRAM fail;<br />

VAR r : RECORD x,y,z : integer END;<br />

BEGIN<br />

END.<br />

r.+ := 2; 1+ isn't a field identifier}<br />

*ERROR 40 -- a record variable is required here<br />

One of the items following WITH is not a variable.<br />

<strong>Pascal</strong> Issue 1 57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!