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 114 -- ROUND needs a real type parameter<br />

Appendix A<br />

The parameter given to ROUND must be of real type. Note that even<br />

though an integer value can often be used in the context of a real value the<br />

standard does not permit integer parameters for ROUND.<br />

PROGRAM fail;<br />

VAR x : real;<br />

BEGIN<br />

END.<br />

n, m : integer;<br />

x := 1.54;<br />

m := ROUND(x);<br />

n := ROUND(m); (sadly, not permitted}<br />

m := ROUND(TRUE); (just rubbish}<br />

*ERROR 115 -- a real or integer type parameter is needed here<br />

This error is issued when a required function is called with a parameter<br />

which does not give either an integer or a real value.<br />

PROGRAM fail;<br />

VAR x : real;<br />

BEGIN<br />

END.<br />

x := SIN('s'); ('s' is neither integer nor real}<br />

*ERROR 116 -- this parameter does not match the specification<br />

given in the declaration of <br />

This message is issued when an actual parameter given to a procedure or<br />

function, < name > , is not of the correct type as defined by the declaration<br />

of < name > .<br />

PROGRAM fail;<br />

VAR x : real;<br />

PROCEDURE thing(VAR w : integer);<br />

BEGIN<br />

END;<br />

BEGIN<br />

<strong>Pascal</strong> Issue ( 85

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

Saved successfully!

Ooh no, something went wrong!