EQUEL Statements and Fortran If Blocks
Because each EQUEL statement may generate several Fortran statements, you must use the block-style Fortran if statement to conditionally transfer control to EQUEL statements. For example:
if (error .eq. .true.) then
## message "Error on update"
## sleep 2
end if
EQUEL also generates many nested constructs of do loops and if blocks specifically for block-structured statements, such as display and unloadtable. If you omit an end if from your Fortran source, the Fortran compiler complains that there is a missing end statement, which you may trace back to a preprocessor-generated if.
You can solve this problem by checking for matching if-end pairs in the original EQUEL/Fortran source file.