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 104 -- this statement requires that the name INPUT appear in<br />

the list of parameters following PROGRAM<br />

If the file parameter is omitted from a call on the procedures READ or<br />

READLN, or the functions EOLN or EOF, the required file INPUT is<br />

assumed. In such cases INPUT must appear as one of the program<br />

parameters at the head of the program. However it must not appear in an<br />

outermost VAR statement.<br />

PROGRAM fail;<br />

BEGIN<br />

END.<br />

readln; (implies use of INPUT}<br />

*ERROR 105 -- this statement requires that the name OUTPUT appear<br />

in the list of parameters following PROGRAM<br />

If the file parameter is omitted from calls on the procedures WRITE,<br />

WRITELN or PAGE the required file OUTPUT is assumed. In such cases<br />

OUTPUT must appear as one of the program parameters at the head of the<br />

program. However it must not appear in an outermost VAR statement.<br />

PROGRAM fail;<br />

BEGIN<br />

END.<br />

writeln('hello'); (implies use of OUTPUT}<br />

*ERROR 106 -- the field width parameters must be of integer type<br />

The parameters used in WRITE and WRITELN to specify field widths<br />

must yield integer values.<br />

PROGRAM fail(output);<br />

BEGIN<br />

END.<br />

writeln('hello ' :9.5);<br />

*ERROR 107 -- ABS needs a real or integer type parameter<br />

The function ABS returns the absolute value of either integer or real values;<br />

it cannot be used with any other types.<br />

82 <strong>Pascal</strong> Issue I

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

Saved successfully!

Ooh no, something went wrong!