A source file may contain fpp tokens. An fpp token is similar to a Fortran token, and is one of:
#define name token-string
This is the definition of an fpp variable. Wherever ‘name’ appears in the source lines following the definition, ‘token-string’ will be substituted for it.
#define name([argname1[,argname2]...]) token-string
This is the definition of a function-like macro. Occurrences of the macro ‘name’ followed by a comma-separated list of arguments within parentheses are substituted by the token string produced from the macro definition. Every occurrence of an argument name from the macro definition's argument list is substituted by the token sequence of the corresponding macro actual argument.
Note that there must be no space or tab between the macro name and the left parenthesis of the argument list in this directive; otherwise, it will be interpreted as a simple macro definition with the left parenthesis treated as the first character of the replacement token-string.
#undef name
Remove any macro definition for name, whether such a definition was produced by a -D option, a #define directive or by default. No additional tokens are permitted on the directive line after the name.
The macro NAGFOR is defined by default.
Read in the contents of filename at this location. The lines read in from the file are processed by fpp as if they were part of the current file.
When the <filename> notation is used, filename is only searched for in the standard “include” directories. See the -I and -Y options above for more detail. No additional tokens are permitted in the directive line after the final ‘"’ or ‘>’.
Generate line control information for the next pass of the compiler. The line-number must be an unsigned integer literal constant, and specifies the line number of the following line. If "filename" does not appear, the current filename is unchanged.
#if condition_1 block_1 #elif condition_2 block_2 #else block_n #endif
#ifdef name block_1 #elif condition block_2 #else block_n #endif
#ifndef name block_1 #elif condition block_2 #else block_n #endif
The “#else” and “#elif” parts are optional. There may be more than one “#elif” part. Each condition is an expression consisting of fpp constants, macros and macro functions. Condition expressions are similar to cpp expressions, and may contain any cpp operations and operands with the exception of C long, octal and hexadecimal constants. Additionally, fpp will accept and evaluate the Fortran logical operations .NOT., .AND., .OR., .EQV., .NEQV., the relational operators .GT., .LT., .LE., .GE., and the logical constants .TRUE. and .FALSE..