fpp(1)
π§ 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 specifyingc_com=no.c_com={yes|no}β Determines whether C-style comments are recognized. If you specifyc_com=noorC, 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>as1(one). This is the same as if aDname=1option appeared on thefppcommand line. This is the same as specifying the following line in the source file processed byfpp:#define name 1.D<name>=<val>β Defines<name>as if by a#definedirective. This is the same as specifying the following line in the source file processed byfpp:#define name var.eβ For fixed-form source files, tells the compiler to accept extended source lines, up to132characters long.e80β For fixed-form source files, tells the compiler to accept extended source lines, up to80characters long.f_com={yes|no}β Determines whether Fortran-style end-of-line comments are recognized or ignored byfpp. If you specifyf_com=noFortran style end-of-line comments are processed as part of the preprocessor directive. By default, Fortran style end-of-line comments are identified byfppon preprocessor lines and are then ignored byfpp; 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 aboutfppoptions.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#includefiles with names enclosed in double-quotes (") are searched for first in the directory of the file with the#includeline, then in directories named withIoptions, and lastly, in directories from the standard list. For#includefiles with names enclosed in angle-brackets (< >), the directory of the file with the#includeline is not searched. path lore, but make it precise π§Mβ Generates make dependencies.mβ Expands macros everywhere. This is the same as specifyingmacro=yes.macro={yes|no_com|no}β Determines the behavior of macro expansion. If you specifymacro=no_commacro expansion is turned off in comments. If you specifymacro=nono 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 specifymacro_expand=vcmacros are expanded in Microsoft Visual C/C++ order. If you specifymacro_expand=cppmacros are expanded in GNU CPP order.MF=<file>β Makesfppappend 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 asc_com=yes.noJβ Specifies that F90-style comments should be recognized in a#defineline. This is the same asf_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&. Thefpppreprocessor 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 anfppvariable 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:__i386and__x86_64.undefβ Removes initial definitions for all predefined symbols.Vβ Displays thefppversion 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:
fpppreprocessor directive names. For more information onfpppreprocessor directives, see Using fpp Preprocessor Directives.- symbolic names including Fortran keywords
fpppermits 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, orDin 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#ifor#elifdirective. Within such comments, macro expansions are not performed, but they can be switched on by-f-com=no. fppcomments between/*and*/. They are excluded from the output and macro expansions are not performed within these symbols.fppcomments can be nested: for each/*there must be a corresponding*/.fppcomments 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).
- Fortran language comments. A fixed form source line containing one of the symbols
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:
- 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#ifor#elifdirective. Within such comments, macro expansions are not performed, but they can be switched on by option-f_com=no. fppcomments 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.
- 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 formMmm dd yyyy.__TIME__β swaps in the time that fpp processed the input file, as a character string literal in the formhh:mm:ss.__TIMESTAMP__β swaps in the timestamp that fpp processed the input file, as a character string literal in the formday date time year, wheredayis a 3-letter abbreviation,dateisMmm dd,timeishh:mm:ssandyearisyyyy.
π¦ 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
IorYpreprocessor 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
IorYpreprocessor 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
INCLUDEstatements - fpp and Fortran comments
- Fortran
IMPLICITstatements that specify a single letter - Fortran
FORMATstatements - 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 (
callpin 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:
#ifpreprocessor directive β when#ifis specified, subsequent lines up to the matching#else,#elif, or#endifpreprocessor directive appear in the output only ifconditionevaluates to.TRUE.. Example:
#if condition_1
block_1
#elif condition_2
block_2
#elif ...
#else
block_n
#endif
#ifdefpreprocessor directive β when#ifdefis specified, subsequent lines up to the matching#else,#elif, or#endifpreprocessor directive appear in the output only ifnamehas been defined, either by a#definepreprocessor directive or by theDpreprocessor option, with no intervening#undefpreprocessor directive. No additional tokens are permitted on the preprocessor directive line aftername. Example:
#ifdef name
block_1
#elif condition
block_2
#elif ...
#else
block_n
#endif
#ifndefpreprocessor directive β when#ifndefis specified, subsequent lines up to the matching#else,#elif, or#endifpreprocessor directive appear in the output only ifnamehas not been defined, or if its definition has been removed with an#undefpreprocessor directive. No additional tokens are permitted on the directive line aftername. 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
#ifdirective evaluates to.FALSE., the name in the preceding#ifdefdirective is not defined, or the name in the preceding#ifndefdirective is defined - The conditions in all of the preceding
#elifdirectives evaluate to.FALSE. - The condition in the current
#elifevaluates 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)ordefined name, which returns.TRUE.ifnameis 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
- arch rolling: intel-oneapi-toolkit 2026.0.1.27+c9c3d3e3_ddb4_490e_bb41_6e9041ba32a7-2 Β· LicenseRef-Intel-EULA-Developer-Tools AND LicenseRef-Intel-Simplified
- Copyright 2009\-2025, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms