FORTRAN Reference Manual
Compiler Directives
FORTRAN Reference Manual—528615-001
10-17
ENDIF Compiler Directive
•
If you include the directive, Binder allocates precisely the number of pages you
specify whether or not that number is sufficient, and displays a warning message if
the number you specify is less than the compiler’s estimate.
Example
?DATAPAGES 16
ENDIF Compiler Directive
The ENDIF directive terminates the effect of a preceding IF or IFNOT directive that
specifies the same toggle number.
toggle
is a number in the range 1 through 15.
Considerations
•
Write the ENDIF directive as the only item on a directive line.
•
Use the IF, IFNOT, and ENDIF directives with the SETTOG and RESETTOG
directives to control conditional compilation.
•
Note that IFNOT is not equivalent to ELSE.
Example
In the following example, if you use a SETTOG 2 directive, code A is compiled; if you
use a SETTOG 3 directive, code B is compiled.
?IF 2
code A
?ENDIF 2
?IF 3
code B
?ENDIF 3
ENDIF toggle










