ISO Pascal reference manual
ISO Pascal reference manual
ISO Pascal reference manual
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
*ERROR 31 -- this expression has not been formed correctly<br />
This message indicates that the compiler cannot make any sense of an<br />
expression.<br />
*ERROR 32 -- is a procedure and may not be used in<br />
an expression<br />
Appendix A<br />
The name of a procedure is not a valid operand in an expression as a<br />
procedure call does not return a result. Procedures may only be called or<br />
passed as parameters.<br />
PROGRAM fail;<br />
VAR j : integer;<br />
PROCEDURE twenty;<br />
VAR result : integer;<br />
BEGIN<br />
result := 20;<br />
END;<br />
BEGIN<br />
j := twenty; (wrong)<br />
END.<br />
*ERROR 33 -- must be followed by a boolean expression<br />
This error indicates that the given < item > is only meaningful if followed<br />
by an expression which gives a boolean result but no such expression has<br />
been found.<br />
PROGRAM fail(output);<br />
VAR x : integer;<br />
BEGIN<br />
x := 1;<br />
IF x THEN writeln('oops'); (x isn't boolean)<br />
END.<br />
*ERROR 34 -- the operand to the left of must give a boolean value<br />
The reserved words AND and OR may only follow a boolean operand. In<br />
particular they may not be used to form conjunctions or disjunctions of bit<br />
<strong>Pascal</strong> Issue 1 55