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.

Chapter 5<br />

non-occurrence of this message cannot be interpreted as meaning that<br />

statements can be executed.<br />

PROGRAM warn(output);<br />

CONST check = false;<br />

BEGIN<br />

END.<br />

IF check THEN writeln('checking is enabled');<br />

Warning 5 -- check that an empty statement is really wanted here<br />

Certain constructions in <strong>Pascal</strong> control the execution of a statement, e.g. IF<br />

and WHILE. In such cases it is possible to specify that a null or empty<br />

statement be controlled. This is acceptable <strong>Pascal</strong>, but the compiler will<br />

issue a warning as it is very likely that the null statement is the result of a<br />

misplaced semicolon.<br />

PROGRAM warn(output);<br />

[this program will only output ONE Line because of the)<br />

[dubious semicolon following the DO)<br />

VAR n:1..10;<br />

BEGIN<br />

END.<br />

FOR N := 1 TO 10 DO;<br />

writeln('Hello there');<br />

Warning 9 -- only the first 253 characters of this identifier<br />

-- will be used<br />

This warning is issued when an identifier contains more than 253<br />

characters. As it is not at all easy to construct a program containing<br />

identifiers of anything like this length, it is highly unlikely that the warning<br />

will ever be issued except from programs which deliberately set out to<br />

generate it.<br />

Warning 19 -- has not been used<br />

Warning 19 -- the field of the record at line <br />

-- has not been used<br />

This warning indicates that < name > has been declared but has never been<br />

used. It is intended to be used to help remove redundant variables and to<br />

22 <strong>Pascal</strong> Issue 1

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

Saved successfully!

Ooh no, something went wrong!