3. Embedded QUEL for COBOL : Precompiling, Compiling, and Linking an EQUEL Program : Coding Requirements for Writing EQUEL Programs : COBOL IF-THEN-ELSE Blocks
 
Share this page                  
COBOL IF-THEN-ELSE Blocks
There are some statements that normally generate an IF-THEN-ELSE construct in other languages that instead generate IF-GOTO constructs in COBOL. The reason for this is that there is no way to ensure that no EQUEL-generated (or programmer-generated) period will appear in an IF block. Consequently, in order to allow any statement in this scope, EQUEL generates an IF-GOTO construct. The code generated by EQUEL for this construct is actually very similar to the code generated by any compiler for an IF-THEN-ELSE construct and as efficient.