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.

*Execution error -- reset on non-existent file -- <br />

Appendix C<br />

This message is the result of calling RESET on a file which does not exist.<br />

The most common cause is declaring a file variable and applying reset to it<br />

before anything has been sent to it.<br />

PROGRAM error(output);<br />

VAR f : text;<br />

BEGIN<br />

END.<br />

reset(f); (it doesn't exist yet}<br />

writeln('Error not detected');<br />

*Execution error -- rewrite fails -- <br />

This message is issued when the host operating system cannot open a file for<br />

output. One of the more common causes of this is an attempt to open more<br />

files at once than is permitted. < reason > should be an explanatory<br />

message from the operating system.<br />

*Execution error -- no association for <br />

This message is generated when an attempt is made to execute a program<br />

without specifying the actual file to be used when the program parameter<br />

< name > is <strong>reference</strong>d.<br />

*Execution error -- RESET required before read access<br />

This error is caused by an attempt to read from an output file. Before the<br />

data in an output file may be accessed the file must be made an input file by<br />

calling the procedure RESET.<br />

PROGRAM error(output);<br />

VAR f : text;<br />

BEGIN<br />

END.<br />

c : char;<br />

rewrite(f); {it's an output file}<br />

read(f, c); (wrong}<br />

<strong>Pascal</strong> Issue 1 109

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

Saved successfully!

Ooh no, something went wrong!