An EQUEL Statement that Does Not Generate Code
The declare cursor statement does not generate any Pascal code. This statement should not be coded as the only statement in Pascal constructs that does not allow null statements. For example, coding a declare cursor statement as the only statement in a Pascal if statement not bounded by begin and end would cause compiler errors:
if (using_database)
## declare cursor empcsr for retrieve (employee.ename)
else
writeln('You have not accessed the database.');
The code generated by the preprocessor would be:
if (using_database)
else
writeln('You have not accessed the database.');
which is an illegal use of the Pascal else clause.