#included files) from that definition line to the end of the current file.
However, it does not affect:
IMPLICITsingle letter specifications;
The scope of the macro effect can be limited by means
#define long_macro_name(x,\ y) x*y
After this directive, ‘name’ will not be interpreted by fpp as a macro or variable name. This directive has no effect if ‘name’ is not a macro name.
Condition is a constant expression, as specified below.
Subsequent lines up to the first matching
#endif directive appear in the output only if
the condition is true.
The lines following a
#elif directive appear
in the output only if
#ifdirective was false,
#elifdirectives were false, and
#elifdirective is true.
If the condition is true, all subsequent matching
directives are ignored up to the matching
The lines following a
#else directive appear in the output only if
all previous conditions in the construct were false.
The macro function ‘defined’ can be used in a constant expression; it is true if and only if its argument is a defined macro name.
The following operations are allowed.
||. These are interpreted in accordance with C language semantics, for compatibility with cpp.
!=’ (not equal) can be used in
#elifdirectives, but cannot be used in a
#definedirective, where the character ‘
!’ is interpreted as the start of a Fortran comment.
#elseand the matching
#endifare ignored. If the preceding conditional indicates that lines would be ignored, subsequent lines are included in the output.
#character) can be placed anywhere in the source code, in particular immediately before a Fortran continuation line. The only exception is the prohibition of fpp directives within a macro call divided on several lines by means of continuation symbols.
d’ or ‘
D’ in the first column is considered to be a comment line. Within such lines macro expansions are not performed. The ‘
!’ character is interpreted as the beginning of a comment extending to the end of the line. The only exception is the case when this symbol occurs within a constant expression in a
/*’ and ‘
*/’ character sequences. These are excluded from the output. Fpp comments can be nested so that for each opening sequence ‘
/*’ there must be a corresponding closing sequence ‘
*/’. Fpp comments are suitable for excluding the compilation of large portions of source instead of commenting every line with Fortran comment symbols. Using “
#if 0 ... #endif” achieves the same effect without being ridiculous.
.TRUE. if name is defined as a macro,
In fixed form there are limitations on macro expansion in the label part of the line (columns 1-5):
#define call p(x) call f(x) call p(0)
fpp can not determine with certainty how to interpret the ‘call p’ token sequence. It could be considered as a macro name. The current implementation does the following:
warning: possibly incorrect substitution of macro callp
It should be noted that this situation appears only when preprocessing fixed form source code and when the blank character is not being interpreted as a token delimiter. It should be said also that if a macro name coincides with a keyword beginning part, as in the following case:
#define INT INTEGER*8 INTEGER kthen in accordance with the described algorithm, the INTEGER keyword will be found earlier than the INT macro name. Thus, there will be no warning when preprocessing such a macro definition.