28.06.2013 Views

ISO Pascal reference manual

ISO Pascal reference manual

ISO Pascal reference manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

*ERROR 124 -- this parameter must have packed type<br />

Appendix A<br />

The first parameter of UNPACK and the third parameter of PACK must<br />

be <strong>reference</strong>s to arrays which have been declared PACKED.<br />

PROGRAM fail;<br />

VAR p : ARRAY [1..5] OF char;<br />

u : ARRAY [1..5] OF char;<br />

BEGIN<br />

pack(u, 1, p); (p is not PACKED}<br />

unpack(p, u, 1); (p is not PACKED}<br />

END.<br />

*ERROR 125 -- this parameter must not have packed type<br />

The first parameter of PACK and the third parameter of UNPACK must<br />

not be <strong>reference</strong>s to arrays which have been declared PACKED.<br />

PROGRAM fail;<br />

VAR p : PACKED ARRAY [1..5] OF char;<br />

u : PACKED ARRAY C1..5] OF char;<br />

BEGIN<br />

pack(u, 1, p); (u is PACKED}<br />

unpack(p, u, 1); (u is PACKED}<br />

END.<br />

*ERROR 126 -- this item may not be passed as a VAR parameter<br />

The variable used to define the currently active variant of a record may not<br />

be passed to a procedure or function as a VAR parameter.<br />

PROGRAM fail;<br />

VAR r : RECORD<br />

CASE x : boolean OF<br />

true: (t : integer);<br />

false:(f : real);<br />

END;<br />

PROCEDURE test(VAR v : boolean);<br />

BEGIN<br />

END;<br />

BEGIN<br />

<strong>Pascal</strong> Issue I 89

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

Saved successfully!

Ooh no, something went wrong!