ISO Pascal reference manual
ISO Pascal reference manual
ISO Pascal reference manual
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
PROGRAM fail;<br />
VAR a, b : ARRAY C1..5] of integer;<br />
VAR c : ARRAY C2..6] of integer;<br />
PROCEDURE unique( x : ARRAY[low..high : integer]<br />
of integer;<br />
y : ARRAY[small..big : integer]<br />
of integer)<br />
BEGIN<br />
END;<br />
PROCEDURE share(x, y : ARRAY[low..high : integer]<br />
of integer)<br />
BEGIN<br />
END;<br />
BEGIN<br />
unique(b, a); {ok}<br />
unique(a, c); {ok}<br />
unique(c, c); {ok}<br />
share(b, a); {OK a & b have the same bounds}<br />
share(a, c); {not OK a & c have different bounds}<br />
share(c, c); {OK - they must be the same}<br />
END.<br />
*ERROR 140 -- more values have been supplied than are required by<br />
the array<br />
Appendix A<br />
This error is issued when the list of constants used to initialise an EXPORT<br />
or STATIC array contains more values than the array has elements.<br />
EXPORT and STATIC are extensions to standard <strong>Pascal</strong>.<br />
PROGRAM fail;<br />
STATIC a : ARRAY C1..3] OF char := 'a', 'b', 'c', 'd';<br />
BEGIN<br />
END.<br />
*ERROR 141 -- PACK and UNPACK may only be used to move data between<br />
arrays whose elements are of identical type<br />
This message is issued when an attempt is made to use PACK or UNPACK<br />
to assign values of an unsuitable type to the destination array.<br />
<strong>Pascal</strong> Issue 1 95