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 />
VAR S : SET OF 1..9;<br />
BEGIN<br />
s := [1,2„3];<br />
END.<br />
*ERROR 55 -- the ordinal values of components of sets are restricted<br />
to being in the range 0..255<br />
Appendix A<br />
The <strong>Pascal</strong> standard does not prescribe any limits on the range of ordinal<br />
values that components of sets may take. This implementation restricts the<br />
ordinal values of all components of sets to the range 0..255.<br />
PROGRAM fail;<br />
TYPE big = 1..1000;<br />
small = 5..30;<br />
VAR bs : SET OF big; (too big}<br />
ss : SET OF small; (ok}<br />
BEGIN<br />
END.<br />
*ERROR 56 -- the name of a type is required here<br />
This error indicates that the compiler expected an identifier which has been,<br />
or is to be declared as a type. The common cause of such errors is<br />
attempting to define types explicitly (e.g. 1..10) rather than giving them a<br />
name in a TYPE declaration first.<br />
PROGRAM fail;<br />
TYPE small = 1..10;<br />
7 = 1..7; 17 is not an identifier}<br />
VAR p :t1..12; ((needs a type identifier}<br />
r : RECORD<br />
CASE x :1..2 OF (CASE needs a type identifier}<br />
1: (a : real);<br />
2: (b : integer)<br />
END;<br />
BEGIN<br />
END.<br />
<strong>Pascal</strong> Issue 1 63