ISO Pascal reference manual
ISO Pascal reference manual
ISO Pascal reference manual
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
END.<br />
thing(x); [x is not an integer variable}<br />
*ERROR 117 -- the parameters required by are different from<br />
those specified in the definition of this parameter<br />
This message is issued when an attempt is made to pass a procedure or<br />
function as a parameter to another procedure or function, < name > , and<br />
the parameters required by the actual parameter do not match those<br />
required by the formal parameters of the parameter of < name > . Note that<br />
the standard is very strict about the matching.<br />
PROGRAM faiL(output);<br />
PROCEDURE actual1(x : integer; y : integer); BEGIN<br />
writeln('actual1');<br />
END;<br />
PROCEDURE actual2(x, y : integer); BEGIN<br />
(NOTE - these parameters are DIFFERENT from actual1's}<br />
writeln('actual2');<br />
END;<br />
PROCEDURE actual3(w : real); BEGIN<br />
writeln('actual3');<br />
END;<br />
PROCEDURE try(a : integer;<br />
PROCEDURE formal(p, q : integer);<br />
c : integer);<br />
BEGIN<br />
formal(a, c);<br />
END;<br />
BEGIN<br />
try(1, actual1, 3); (strictly wrong}<br />
try(1, actual?, 3); (right}<br />
try(1, actual3, 3); (wrong}<br />
END.<br />
86 <strong>Pascal</strong> Issue I