FORTRAN Reference Manual

Compiler Directives
FORTRAN Reference Manual528615-001
10-62
SETTOG Compiler Directive
Considerations
The section-name identifies all source text that follows the SECTION until
another SECTION directive or the end of the source file occurs.
The SECTION directive must be the only directive on the directive line.
Example
The following example includes a file, FUNCTIONS, with a SECTION directive
identifies a section called MATHROUTINES. The program called MAIN sources the
text from the section MATHROUTINES in the file FUNCTIONS.
File: FUNCTIONS.
.
?SECTION mathroutines
SUBROUTINE random (a,b,c)
.
END
?SECTION buildarray
SUBROUTINE array (x,y,z)
.
END
You source in the RANDOM subroutine by including the following directive program:
PROGRAM main
?SOURCE function ( mathroutines )
.
END
SETTOG Compiler Directive
The SETTOG directive sets toggles that control conditional compilation.
toggle
is a number in the range of 1 through 15 that specifies a toggle to set.
SETTOG [ toggle [, toggle ]... ]