fpp(1)

πŸ“¦
version 2026.0.1.27+c9c3d3e3_ddb4_490e_bb41_6e9041ba32a7 Β· 2 versions
, in arch rolling

🧚 fpp(1) β€” Intel(R) Fortran Preprocessor Options, bestie edition 🧚

okay so this is the manual page for fpp(1), aka the Fortran language preprocessor for the Intel(R) Fortran Compiler. It's giving compiler-side glow-up ✨ and we're gonna walk through every flag, every filename, every tiny caveat. no skipping, periodt πŸ’…

πŸŽ€ NAME πŸŽ€

fpp β€” the Fortran language preprocessor for the Intel(R) Fortran Compiler πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

fpp [ options ] [ input-file [ output-file ] ]

✨ DESCRIPTION - fpp ✨

fpp is the source file preprocessor for the Intel(R) Fortran Compiler. It gets invoked automatically by the compiler when compiling a source file that has the suffix -fpp. slay, automatic.

fpp optionally accepts two filenames as arguments: input-file and output-file. They are, respectively, the input file read and the output file written by fpp 🫢

fpp can perform certain textual transformations on input-file and also on files specified by #include directives in input-file. cute little text goblin behavior, honestly.

✨ OPTIONS ✨

This section includes an alphabetic listing of available fpp options. alphabetic, not vibe-based, bestie.

  • B β€” Specifies that C++-style comments should not be recognized. no C++-style comments for you πŸ™ˆ
  • C β€” Specifies that C-style comments should not be recognized. This is the same as specifying c_com=no.
  • c_com={yes|no} β€” Determines whether C-style comments are recognized. If you specify c_com=no or C, C-style comments are not recognized. By default, C-style comments are recognized; that is, c_com=yes.
  • D<name> β€” Defines the preprocessor variable <name> as 1 (one). This is the same as if a Dname=1 option appeared on the fpp command line. This is the same as specifying the following line in the source file processed by fpp: #define name 1.
  • D<name>=<val> β€” Defines <name> as if by a #define directive. This is the same as specifying the following line in the source file processed by fpp: #define name var.
  • e β€” For fixed-form source files, tells the compiler to accept extended source lines, up to 132 characters long.
  • e80 β€” For fixed-form source files, tells the compiler to accept extended source lines, up to 80 characters long.
  • f_com={yes|no} β€” Determines whether Fortran-style end-of-line comments are recognized or ignored by fpp. If you specify f_com=no Fortran style end-of-line comments are processed as part of the preprocessor directive. By default, Fortran style end-of-line comments are identified by fpp on preprocessor lines and are then ignored by fpp; that is, f_com=yes.

Okay so the classic example, because this is the part where comments get spicy:

#define max 100 ! max number do i = 1, max + 1

If you specify f_com=yes fpp will output the following:

do i = 1, 100 + 1

If you specify f_com=no fpp will output the following:

do i = 1, 100 ! max number + 1
  • f77 β€” Tells the compiler to assume FORTRAN 77 language input source.
  • f90 β€” Tells the compiler to assume Fortran 90 language input source.
  • fixed β€” Tells the compiler to assume fixed format in the source file.
  • free β€” Tells the compiler to assume free format in the source file.
  • help β€” Displays information about fpp options.
  • I<dir> β€” Inserts directory <dir> into the search path for files with names not beginning with "/". The #include <dir> is inserted ahead of the standard list of "include" directories so that #include files with names enclosed in double-quotes (") are searched for first in the directory of the file with the #include line, then in directories named with I options, and lastly, in directories from the standard list. For #include files with names enclosed in angle-brackets (< >), the directory of the file with the #include line is not searched. path lore, but make it precise 🧚
  • M β€” Generates make dependencies.
  • m β€” Expands macros everywhere. This is the same as specifying macro=yes.
  • macro={yes|no_com|no} β€” Determines the behavior of macro expansion. If you specify macro=no_com macro expansion is turned off in comments. If you specify macro=no no macro expansion occurs anywhere. By default, macros are expanded everywhere; that is, macro=yes.
  • macro_expand={vc|cpp} β€” Determines the mode of macro expansion. If you specify macro_expand=vc macros are expanded in Microsoft Visual C/C++ order. If you specify macro_expand=cpp macros are expanded in GNU CPP order.
  • MF=<file> β€” Makes fpp append dependencies to <file> .
  • noB β€” Specifies that C++-style comments should be recognized.
  • noC β€” Specifies that C-style comments should be recognized. This is the same as c_com=yes.
  • noJ β€” Specifies that F90-style comments should be recognized in a #define line. This is the same as f_com=no.
  • no-fort-cont β€” Specifies that IDL-style format should be recognized. This option is only for the IDE. Note that macro arguments in IDL may have a C-like continuation character which is different from the Fortran continuation character &. The fpp preprocessor should recognize the C-like continuation character and process some other non-Fortran tokens so that the IDL processor can recognize them. niche IDE behavior, iconic honestly πŸ‘‘
  • P β€” Tells the compiler that line-numbering directives should not be added to the output file. This line-numbering directive appears as
#line-number file-name
  • U<name> β€” Removes any initial definition of <name>, where <name> is an fpp variable that is predefined on a particular preprocessor. The following shows an example of symbols that may be predefined, depending upon the architecture of the system: Operating System: __APPLE__, __unix, and __linux; Hardware: __i386 and __x86_64.
  • undef β€” Removes initial definitions for all predefined symbols.
  • V β€” Displays the fpp version number.
  • w[0] β€” Prevents warnings from being output. By default, warnings are output to standard error stream (stderr).
  • what β€” Displays detailed version information.
  • Xu β€” Converts uppercase letters to lowercase, except within character-string constants. The default is to leave the case as is.
  • Xw β€” Tells the compiler that in fixed-format source files, the blank or space symbol " " is insignificant. By default, the space symbol is the delimiter of tokens for this format.
  • Y<dir> β€” Adds directory <dir> to the end of the system include paths.

🌈 USAGE 🌈

🌸 fpp Source Files 🌸

A source file can contain fpp tokens in the following forms:

  • fpp preprocessor directive names. For more information on fpp preprocessor directives, see Using fpp Preprocessor Directives.
  • symbolic names including Fortran keywords fpp permits the same characters in names as Fortran. For more information on symbolic names, see Using Predefined Preprocessor Symbols.
  • constants. Integer, real, double, and quadruple precision real, binary, octal, hexadecimal (including alternate notation), character, and Hollerith constants are allowed. number representation buffet πŸ“
  • special characters, space, tab, and newline characters.
  • comments, including:
    • Fortran language comments. A fixed form source line containing one of the symbols C, c, *, d, or D in the first position is considered a comment line. The ! symbol is interpreted as the beginning of a comment extending to the end of the line except when the ! occurs within a constant-expression in an #if or #elif directive. Within such comments, macro expansions are not performed, but they can be switched on by -f-com=no.
    • fpp comments between /* and */. They are excluded from the output and macro expansions are not performed within these symbols. fpp comments can be nested: for each /* there must be a corresponding */. fpp comments are useful for excluding from the compilation large portions of source instead of commenting every line with a Fortran comment symbol.
    • C++ -like line comments that begin with // (double-slash).

A string that is a token can occupy several lines, but only if its input includes continued line characters using the Fortran continuation character &. fpp will not merge such lines into one line. respect the line breaks, bestie πŸ’…

Identifiers are always placed on one line by fpp. For example, if an input identifier occupies several lines, it will be merged by fpp into one line.

πŸ¦‹ fpp Output πŸ¦‹

Output consists of a modified copy of the input, plus lines of the form:

#line_number  file_name

These are inserted to indicate the original source line number and filename of the output line that follows. Use the fpp preprocessor option P to disable the generation of these lines.

πŸ‘‘ DIRECTIVES πŸ‘‘

The syntax and semantics for fpp directives are the same as for cpp directives.

All fpp directives start with the number sign (#) as the first character on a line. White space (BLANK or TAB characters) can appear after the initial # for indentation.

fpp directives (beginning with the # symbol in the first position of lines) can be placed anywhere in source code, in particular, before a Fortran continuation line. However, fpp directives within a macro call may not be divided among several lines by means of continuation symbols.

fpp permits three kinds of comments:

  1. Fortran language comments. A comment line is a fixed-format source line containing one of the symbols "C", "c", "*", "d", or "D" in the first position. In fixed or free-form source, the "!" symbol is interpreted as the beginning of a comment extending to the end of the line, except when the "!" occurs within a constant-expression in a #if or #elif directive. Within such comments, macro expansions are not performed, but they can be switched on by option -f_com=no.
  2. fpp comments enclosed in the "/*" and "*/" parasymbols.

They're excluded from the output, and macro expansions are not performed inside these symbols. And bestie β€” fpp comments can be nested πŸͺ†. Every /* needs its matching */. They're literally the moment when you want to yeet a huge chunk of source out of the compilation instead of hand-commenting every single line with a Fortran comment symbol. Iconic laziness, honestly.

  1. C++-like line comments which begin with // (double slash).

okay so fpp directives can be grouped according to their purpose πŸ’… let's go group by group, no skips.

πŸŽ€ Preprocessor Directives for String Substitution πŸŽ€

These ones do substitutions in your program, periodt:

  • __FILE__ β€” swaps in the input file name, as a character string literal.
  • __LINE__ β€” swaps in the current line number in the input file, as an integer constant.
  • __DATE__ β€” swaps in the date that fpp processed the input file, as a character string literal in the form Mmm dd yyyy.
  • __TIME__ β€” swaps in the time that fpp processed the input file, as a character string literal in the form hh:mm:ss.
  • __TIMESTAMP__ β€” swaps in the timestamp that fpp processed the input file, as a character string literal in the form day date time year, where day is a 3-letter abbreviation, date is Mmm dd, time is hh:mm:ss and year is yyyy.

πŸ¦‹ Preprocessor Directive for Inclusion of External Files πŸ¦‹

Want to pull in external files? Use the preprocessor directive #include, in one of these two forms:

#include "filename"
#include <filename>

#include reads the contents of the named file into the specified or default location in the source. And the lines it reads in get processed by fpp as if they were part of the current file β€” same energy, no special treatment 🫢.

When you use the <filename> notation, the compiler only searches for the file name in the standard include directories. Those get searched in this order:

  • In the directories specified by the I or Y preprocessor option
  • In the default directory

When you use the "filename" notation, file names get searched for in this order:

  • In the directory in which the source file resides
  • In the directories specified by the I or Y preprocessor option
  • In the default directory

For more deets, see the fpp preprocessor options Idir and Ydir. And heads up πŸ™ˆ β€” no additional tokens are allowed on the directive line after the final quote symbol or >.

✨ Preprocessor Directive for Line Control ✨

The preprocessor directive #line-number generates line control information for the compiler. It takes this form:

#line-number "filename"

#line-number is an integer constant that is the line number of the next line. filename is the name of the file containing the line. If filename isn't provided, the current file name is assumed.

🌸 Preprocessor Directive for fpp Variable and Macro Definitions 🌸

The preprocessor directive #define can define both simple string variables and more complicated macros. Two forms, bestie:

  • Defining an fpp variable:
#define name token-string

In the above, occurrences of name in the source file get replaced by token-string.

  • Defining an fpp macro:
#define name(argument[,argument] ... ) token-string

In the above, occurrences of the macro name followed by the comma-separated list of actual arguments within parentheses get replaced by token-string. Each occurrence of argument in token-string gets replaced by the token sequence representing the corresponding actual argument in the macro call. An error occurs if the number of macro call arguments isn't the same as the number of arguments in the corresponding macro definition. For example, consider this macro definition:

#define INTSUB(m, n, o) call mysub(m, n, o)

Any use of the macro INTSUB must have three arguments. Also β€” in macro definitions, spaces between the macro name and the open parenthesis symbol ( are prohibited, and that's on purpose: it stops the directive from being interpreted as an fpp variable definition where the rest of the line, beginning with the open parenthesis symbol (, gets interpreted as its token-string.

An fpp variable or macro definition can be of any length and is limited only by the newline symbol 😀. It can be defined in multiple lines by continuing it to the next line with the insertion of a continuation symbol, like so:

#define long_macro_name(x,y) x*y

The occurrence of a newline without a macro-continuation signifies the end of the macro definition. That's the whole boundary, no cap.

The scope of a definition begins from the #define and encloses all the source lines (and source lines from #include files) to the end of the current file β€” except for the following, which are famously not invited to the party:

  • Files included by Fortran INCLUDE statements
  • fpp and Fortran comments
  • Fortran IMPLICIT statements that specify a single letter
  • Fortran FORMAT statements
  • Numeric, typeless, and character constants

πŸ“ Preprocessor Directive to Undefine a Macro πŸ“

The preprocessor directive #undef takes this form:

#undef name

This one removes any definition for name produced by the D preprocessor option, the #define preprocessor directive, or by default. No additional tokens are permitted on the directive line after name.

And if name has not been previously defined, then #undef has no effect β€” it's giving "nothing to see here" πŸ’€.

πŸ”₯ Preprocessor Directive for Macro Expansion πŸ”₯

If, during expansion of a macro, the column width of a line exceeds column 72 (for fixed format) or column 132 (for free format), fpp inserts appropriate Fortran continuation lines ✨.

For fixed format, there is a limit on macro expansions in label fields (positions 1-5):

  • A macro call (together with possible arguments) should not extend beyond column 5.
  • A macro call whose name begins with one of the Fortran comment symbols is considered to be part of a comment.
  • A macro expansion may produce text extending beyond column 5. In that case, a warning will be issued.

In fixed format, when the fpp preprocessor option Xw has been specified, an ambiguity may occur if a macro call occurs in a statement position and a macro name begins or coincides with a Fortran keyword. For example, consider the following:

#define callp(x)   call f(x)

call p(0)

In this case, fpp cannot determine how to interpret the callp token sequence. It could be considered to be a macro name. The current implementation does the following:

  • The longer identifier is chosen (callp in this case)
  • From this identifier the longest macro name or keyword is extracted
  • If a macro name has been extracted, a macro expansion is performed. If the name begins with some keyword, fpp issues an appropriate warning
  • The rest of the identifier is considered a whole identifier

In the previous example, the macro expansion is performed, and the following warning is produced:

warning: possibly incorrect substitution of macro callp

This situation appears only when preprocessing fixed-format source code and when the space symbol is not interpreted as a token delimiter.

In the following case, a macro name coincides with a beginning of a keyword:

#define INT  INTEGER*8

INTEGER k

The INTEGER keyword will be found earlier than the INT macro name. There will be no warning when preprocessing such a macro definition. slay, no drama 🫢

πŸ’œ Preprocessor Directives for Conditional Selection of Source Text πŸ’œ

The following three preprocessor directives are conditional constructs that you can use to select source text:

  • #if preprocessor directive β€” when #if is specified, subsequent lines up to the matching #else, #elif, or #endif preprocessor directive appear in the output only if condition evaluates to .TRUE.. Example:
#if condition_1
block_1
#elif condition_2
block_2
#elif ...
#else
block_n
#endif
  • #ifdef preprocessor directive β€” when #ifdef is specified, subsequent lines up to the matching #else, #elif, or #endif preprocessor directive appear in the output only if name has been defined, either by a #define preprocessor directive or by the D preprocessor option, with no intervening #undef preprocessor directive. No additional tokens are permitted on the preprocessor directive line after name. Example:
#ifdef name
block_1
#elif condition
block_2
#elif ...
#else
block_n
#endif
  • #ifndef preprocessor directive β€” when #ifndef is specified, subsequent lines up to the matching #else, #elif, or #endif preprocessor directive appear in the output only if name has not been defined, or if its definition has been removed with an #undef preprocessor directive. No additional tokens are permitted on the directive line after name. Example:
#ifndef name
block_1
#elif condition
block_2
#elif ...
#else
block_n
#endif

The #else, #elif, or #endif preprocessor directives are optional. They can be used in the above preprocessor directives.

Subsequent lines up to the matching #else, #elif, or #endif appear in the output only if all of the following occur:

  • The condition in the preceding #if directive evaluates to .FALSE., the name in the preceding #ifdef directive is not defined, or the name in the preceding #ifndef directive is defined
  • The conditions in all of the preceding #elif directives evaluate to .FALSE.
  • The condition in the current #elif evaluates to .TRUE.

Any condition allowed in an #if directive is allowed in an #elif directive. Any number of #elif directives may appear between an #if, #ifdef, or #ifndef directive and a matching #else or #endif directive. Go off, stack them 😌

🌈 Conditional Expressions 🌈

condition_1, condition_2, etc. are logical expressions involving fpp constants, macros, and intrinsic functions. The following items are permitted in conditional expressions:

  • C language operations: <, >, ==, !=, >=, <=, +, -, /, *, %, <<, >>, &, ~, |, &&, and || β€” interpreted by fpp in accordance to the C language semantics. This facility is provided for compatibility with older Fortran programs using cpp.
  • Fortran language operations: .AND., .OR., .NEQV., .XOR., .EQV., .NOT., .GT., .LT., .LE., .GE., .NE., .EQ., ** (power).
  • Fortran logical constants: .TRUE., .FALSE.
  • The fpp intrinsic function defined: defined(name) or defined name, which returns .TRUE. if name is defined as an fpp variable or a macro. It returns .FALSE. if the name is not defined.

#ifdef is shorthand for #if defined(name) and #ifndef is shorthand for #if .not. defined(name). iykyk πŸ’…

Only these items, integer constants, and names can be used within a constant expression. That's the whole guest list, bestie β€” nobody else gets in πŸŽ€

A name that has not been defined with the D preprocessor option, a #define preprocessor directive, or defined by default, has a value of zero. No cap, that's just how it is πŸ’…

The C operation != (not equal) can be used in the #if or #elif preprocessor directive, but not in the #define preprocessor directive β€” because there, the symbol ! is considered to be the Fortran comment symbol by default. So like… it's a whole different personality in that context, iykyk 😭


πŸ’» TECHNICAL SUPPORT

You can find product documentation for many released products at:

https://software.intel.com/content/www/us/en/develop/documentation.html

Go read, it's giving very informed ✨

🌸 Product Website and Support

To find product information, register your product, or contact Intel, visit:

https://software.intel.com/content/www/us/en/develop/support.html

At the support site, you will find comprehensive product information, including:

  • Links to Get Started, Documentation, Individual Support, and Registration. 🫢
  • Links to information such as white papers, articles, and user forums. πŸ“š
  • Links to product information.
  • Links to news and events. πŸ—žοΈ

πŸŽ€ Online Service Center

For more information about the Online Service Center visit:

https://supporttickets.intel.com/servicecenter
NOTE: To access support, you must register your product at the Intel Registration Center: https://registrationcenter.intel.com/en/products/ β€” yeah bestie, you gotta sign up first, no skipping the line πŸ™ˆ

πŸ¦‹ Release Notes

For detailed information on system requirements, late changes to the products, supported architectures, operating systems, and Integrated Development Environments (IDE) see the Release Notes for the product. That's where all the late-breaking lore lives πŸ‘‘

πŸ’¬ Forums

You can find helpful information in the Intel Software user forums. You can also submit questions to the forums. Honestly? Great place to ask when you're stuck at 2am πŸŒ™

To see the list of the available forums, go to:

https://community.intel.com/t5/Software-Development-Tools/ct-p/software-dev-tools

⭐ SEE ALSO

Your compiler documentation has additional reference material on features of your compiler. Like, go read your own compiler docs, they said it, not me πŸ’–


πŸ“œ Notices and Disclaimers

Okay this is the serious part, bestie, so lock in 🫑

Intel technologies may require enabled hardware, software or service activation.

No product or component can be absolutely secure.

Your costs and results may vary.

(C) Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.

Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to:

http://www.intel.com/design/literature.htm

Product and Performance Information

= = = = = = = = = =

Performance varies by use, configuration and other factors. Learn more at:

www.Intel.com/PerformanceIndex.

Notice revision #20201201

= = = = = = = = = =

Intel, the Intel logo, Intel Atom, Intel Core, Intel Xeon, Intel Xeon Phi, Pentium, and VTune are trademarks of Intel Corporation in the U.S. and/or other countries.

*Other names and brands may be claimed as the property of others.

Portions Copyright (C) 2001, Hewlett-Packard Development Company, L.P.

Microsoft, Windows, and the Windows logo are trademarks, or registered trademarks of Microsoft Corporation in the United States and/or other countries.

(C) Intel Corporation.

This software and the related documents are Intel copyrighted materials, and your use of them is governed by the express license under which they were provided to you ( License). Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related documents without Intel's prior written permission. Yeah β€” read the license, don't be that person 😬

This software and the related documents are provided as is, with no express or implied warranties, other than those that are expressly stated in the License.

Intel optimizations, for Intel compilers or other products, may not optimize to the same degree for non-Intel products.


And that's the whole page, bestie! πŸ’œ Copyright(C) 2009-2025 belongs to Intel Corporation, this is the fpp(1) page, and we're all caught up β€” slay, go compile something iconic βœ¨πŸŽ€

πŸ“¦ where this page comes from