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 17 -- is a reserved word and may not be used as<br />

an identifier<br />

Appendix A<br />

The <strong>Pascal</strong> words which are known to the compiler: BEGIN, VAR, IF etc.<br />

are reserved and must not be used to identify objects to be used in the<br />

program<br />

PROGRAM fail;<br />

VAR from, to, high, low : integer; (TO is reserved)<br />

BEGIN<br />

END.<br />

*ERROR 18 -- may not be used as a set operator<br />

The only permissible set operators are + ' (set union), `-' (set difference),<br />

"" (set intersection) and the comparison operators = < >', < =' and<br />

t> =,.<br />

PROGRAM fail;<br />

VAR s,t,u:SET OF char;<br />

BEGIN<br />

END.<br />

T :=<br />

U :=<br />

S := T / U; (what would this mean?)<br />

*ERROR 20 -- has already been declared in this block<br />

This error is generated when the compiler detects that < name > is being<br />

declared for the second or subsequent time in a block. Each identifier in any<br />

block may only have a unique meaning.<br />

PROGRAM fail;<br />

VAR max : integer; (correct declaration)<br />

BEGIN<br />

END.<br />

n : char;<br />

max : real; (max cannot be both integer and real)<br />

<strong>Pascal</strong> Issue 1 51

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

Saved successfully!

Ooh no, something went wrong!