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.

Appendix A<br />

a type is used to select an object from a number of objects an ordinal type is<br />

required. This message is issued when the identifier of such a type is needed<br />

but has not been given.<br />

PROGRAM fail;<br />

VAR a : ARRAY [2..8] OF integer;<br />

PROCEDURE p(w : ARRAY [min..max:real] OF integer);<br />

(real is not an ordinal type 11<br />

BEGIN<br />

END;<br />

BEGIN<br />

p(a);<br />

END.<br />

*ERROR 66 -- the type of result returns must be defined here<br />

< name> is being defined as a function which means that when it is<br />

invoked it will return a value as its result. The type of that result must be<br />

specified at the indicated point.<br />

PROGRAM fail;<br />

FUNCTION unknown(x:integer); BEGIN<br />

(result type here 1}<br />

unknown := x-1;<br />

END;<br />

BEGIN<br />

END.<br />

*ERROR 67 -- the type of was given in a previous FORWARD<br />

declaration and must not be repeated here<br />

< name > has already been declared as a function in a FORWARD<br />

declaration at which time the type of result it returns must have been<br />

defined. The current statement is the actual definition of the function. Sadly<br />

<strong>Pascal</strong> forbids the repetition of the result type under these circumstances.<br />

<strong>Pascal</strong> Issue 1 67

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

Saved successfully!

Ooh no, something went wrong!