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.

PROGRAM fail(output);<br />

FUNCTION two:integer; FORWARD;<br />

PROCEDURE show; BEGIN<br />

writeln(two);<br />

END;<br />

FUNCTION two:integer; {not permitted}<br />

BEGIN<br />

two := 22222;<br />

END;<br />

BEGIN<br />

show;<br />

END.<br />

*ERROR 68 -- the type of result returned by does not<br />

match a previous FORWARD declaration<br />

This message is issued when the type of a function is different from a<br />

previous specification of that function. The error is an additional indication<br />

of trouble as it is only ever generated under the circumstances when error<br />

70 will also be issued.<br />

PROGRAM fail(output);<br />

FUNCTION two:integer; FORWARD;<br />

PROCEDURE show; BEGIN<br />

writeln(two);<br />

END;<br />

FUNCTION two:real; [not permitted}<br />

[and the wrong type}<br />

BEGIN<br />

two := 22.222;<br />

END;<br />

BEGIN<br />

show;<br />

END.<br />

68 <strong>Pascal</strong> Issue I

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

Saved successfully!

Ooh no, something went wrong!