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 6 -- an illegal space has been detected in <br />

The compiler has detected that an otherwise meaningless input sequence<br />

could be made understandable by removing one or more spaces. The error is<br />

usually caused by inserting spaces into the compound symbols such as < >,<br />

< = , > = etc.<br />

PROGRAM fail;<br />

VAR j,k:integer;<br />

BEGIN<br />

END.<br />

k := 0; (ok)<br />

J : = 1; (wrong)<br />

*ERROR 7 -- digits are required here<br />

This message indicates that a numerical constant has been formed<br />

incorrectly. The common cause is the omission of digits following a decimal<br />

point or following the exponential marker 'E'.<br />

PROGRAM fail;<br />

VAR r : real;<br />

BEGIN<br />

END.<br />

r := 1.; (should be 1.0;)<br />

r := 1.2e; [should be 1.2e3 for example)<br />

*ERROR 8 -- a space is required here<br />

This message is given when a reserved word immediately follows a sequence<br />

of digits without an intervening space. Even though there is no practical<br />

reason why such input must be rejected, the unfortunate choice of wording<br />

in the standard requires conforming compilers to report an error.<br />

PROGRAM fail;<br />

VAR j,k:integer;<br />

BEGIN<br />

k := 19;<br />

IF k > 0THEN j := 12;<br />

( ! space needed here)<br />

j := 123MOD k;<br />

48 <strong>Pascal</strong> Issue 1

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

Saved successfully!

Ooh no, something went wrong!