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