📄 fpp.1
字号:
.\" @(#)fpp.1 1.1 96/06/05 SMI; from S5R3.na.TH fpp 1 "19 Aug 1996" .SH NAMEfpp \- the Fortran language preprocessor for FORTRAN 77 and Fortran 90..SH SYNOPSIS.B fpp [.B options] [.I input-file[.I output-file] ].SH DESCRIPTION.B fpp is the preprocessor for FORTRAN 77 and Fortran 90..B fpp optionally accepts two filenames as arguments.input-file and output-file are, respectively, the input file readand the output file written by the preprocessor. By default standard input and output are used..B fpp should be used instead of the cpp preprocessorwith the Sun FORTRAN 77 compiler..SH OPTIONS.TP.BI \-c_com = {yes|no}By default, C style .B comments are recognized. Turn this off by specifying.I -c_com=no.TP.BI \-D nameDefine the preprocessor variable.I name as 1 (one). Thisis the same as if a.BI \-D name=1option appeared on the.B fpp command line, or as if a.RS.IP.BI #define " name " 1 .RE.IPline appeared in the source file, which is processed by .B fpp..br.ne 5.TP.BI \-D name = defDefine.I nameas if by a.B #definedirective.This is the same as if a.RS.IP.BI #define " name " def.RE.IPline appeared in the source file that .B fppis processing.The.B \-Doption has lower precedence than the.B \-Uoption.That is, if the same name is used in both a.B \-Uoption and a.B \-Doption, the name will be undefined regardless of the order of the options..TP.BI \-fixedAssumes fixed format input source..TP.BI \-freeAssumes free format input source..TP.BI \-I directoryInsert .I directoryinto the search path for.B #includefiles with names not beginning with.RB ` / '..I directoryis inserted ahead of thestandard list of ``include'' directories.Thus,.B #includefiles with names enclosed indouble-quotes (\f3"\f1)are searched for first in the directory of the file with the.B #includeline, then in directories named with.B \-Ioptions, and lastly, in directories from the standard list.For.B #includefiles with names enclosed in angle-brackets.RB ( <\|> ),the directory of the file with the.B #includeline is not searched..TP.BI \-MGenerate a list of makefile dependencies and.B writethem to the standard output. This listindicates that the object file which would begenerated from the input file depends on theinput file as well as the include filesreferenced..TP.BI \-macro = {yes|no_com|no}By default, macros are expanded .B everywhere.Turn off macro expansion in comments by specifying.I -macro=no_comand turn off macro expansion all together by specifying.I -macro=no.TP.BI \-P Do not put line numbering directives to the output file. This directive appearsas.RS\f2#line-number file-name\f1.RE.TP.BI \-U nameRemove any initial definition of.IR name ,where.I nameis a .B fppvariable that is predefined by a particular preprocessor.Here is a partial list of symbols that may be predefined, depending uponthe architecture of the system:.RS.RS.TP 20Operating System:.PD 0.BR unix ,.BR __unix ,.BR and __SVR4.TP 20Hardware:.BR sun ,.BR __sun ,.BR sparc ,.BR and __sparc.PD.RE.RE.TP.BI \-undefRemove initial definitions for all predefined symbols..TP.BI \-w0Don't output warnings from.B fpp to stderr..TP.B \-Xu Convert upper-case letters .B to lower-case, except within character-string constants. The default is to not convert upper-case letters to lower-case..TP.BI \-XwFor fixed form source files (See below).B fppassumes that the symbol ' ' (space) is insignificant.By default for this form the 'space' symbol is thedelimiter of tokens..TP.BI \-Y directoryUse the specified .BI " directory "in place of the standard list of directories when searching for.B#includefiles..TP.B fpp also understands some FORTRAN 77 compiler options (See f77(1)):.TP.BI \-e Accept extended source lines, up to 132 characterslong..TP.BI \-w Do not output warnings to stderr..SH USAGE.SS Source files.LP.B fppoperates on both fixed and free formsource files. Files with '.F' extension are assumed to be infixed form, and files with '.F90' extensions (and all others) are assumed to be in free form by default. There is the '-fixed' option for using fixed form in Fortran 90. .B fpp recognizes the tab format of a source line when in fixed mode..LPA source file may contain .B fpp tokens. .B fpp tokens are closeto those of Fortran. They are:.RS.TP- fpp directive names..TP- symbolic names including Fortran keywords. fpppermits all symbols in names that Fortran does..TP- constants. Integer, real, double and quadrupleprecision, binary, octal, hexadecimal includingalternate notation, character and hollerith..TP- comments. There are Fortran comments and .B fppcomments..TP- others. Special characters, space, tab, newline, etc..RE.SS OutputOutput consists of a modified copy of the input,plus lines of the form: \f2#line_number file_name\f1.LPinserted to indicate the original source line number and filename ofthe output line that follows.There is the '-P' option (See above) which disables the generationof these lines..SS DirectivesSyntax and semantics of .B fpp directives are the same as .B cppdirectives (See cpp(1))..LPAll .B fpp directives start with the hash symbol (#) as thefirst character on a line. White space (SPACE or TABcharacters) can appear after the initial '#' for properindentation. The directives can be divided into the followinggroups: .LP- macro definitions;.LP- conditional source code selection;.LP- inclusion of external files;.LP- line control..SS Macro definition..LPThe #define directive is used to define both simple string variables and more complicated macros:.LP\f3#define \f2name token-string\f1.LPThis is the definition of a .B fpp variable. Wherever 'name' appears in the source lines following the definition, 'token-string' will be substituted for 'name'..LP\f3#define \f2name(argument [, argument] ... ) token-string\f1.LPThis is the definition of a function-like macro.Occurrences of the macro 'name' followed bythe comma-separated list of arguments within parenthesesare substituted by the token stringproduced from the macro definition. Every occurrenceof an argument identifier from the macro definition's arguments list issubstituted by the token sequence representing thecorresponding macro actual argument..LPIn these definitions, spaces between the macro name andthe '(' symbol are prohibited to prevent thedirective being interpreted as a .B fpp variabledefinition with the rest of the line beginningwith the '(' symbol being interpreted as a token-string..LP\f3#undef \f2name\f1.LPRemove any definition for 'name' (produced by 'D' options,#define directives or by default). No additional tokens are permitted on the directive line after the name..SS Including External Files.There are two forms of file inclusion:.LP\f3#include "\f2filename\|\f3"\f1.LP.BI #include " " < filename >.LPRead in the contents of filename at this location. The lines read in from the file are processed by.B fpp as if it were a partof the current file. .LPWhen the <filename> notationis used, filename is only searched for in thestandard ``include'' directories. See the 'I' and 'Y' options above for more detail.No additional tokens are permitted in the directiveline after the final `"' or `>'..SS Line control..LP\f2#line-number "filename"\f1.LPGenerate line control information for the next passof the compiler. The integer-constant is interpretedas the line number of the next line and the filenameis interpreted as the name of the file from where it comes.If "filename" is not given, the current filename isunchanged. .SS Conditional selection of source text.There are two forms of conditional selection of source text.LP.TP 1) \f3#if \f2condition_1\f1 block_1 \f3#elif \f2condition_2\f1 block_2 \f3#else\f1 block_n \f3#endif\f1.TP 2) \f3#ifdef \f2name\f1 block_1 \f3#elif \f2condition\f1 block_2 \f3#else\f1 block_n \f3#endif\f1.TPor \f3#ifndef \f2name\f1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -