FORTRAN Reference Manual
Compiler Directives
FORTRAN Reference Manual—528615-001
10-37
IFNOT Compiler Directive
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
IFNOT Compiler Directive
The IFNOT directive identifies the beginning of a sequence of source records that 
FORTRAN compiles only if a specified toggle is reset. The compiler continues 
compiling source records until it encounters either an ENDIF directive that specifies the 
same toggle number as is specified in the IFNOT directive or until the compiler 
encounters the end of the source file.
If the toggle specified on the IFNOT directive is set, FORTRAN skips all subsequent 
input records until it encounters an ENDIF directive with the same toggle number as is 
specified in the IFNOT directive.
toggle
is a number in the range of 1 through 15.
Considerations
•
Write the IFNOT directive as the last item on a directive line.
•
You cannot nest IFNOT directives.
IFNOT toggle










