OptionsIndicates either special actions to be performed by the compiler or linker, or special properties of input or output files.
If you specify more than one option, separate each option with a space.
Certain options have the format of -option "keyword", where the "keyword" can be abbreviated to its shortest unique prefix. For example, -assume noaccuracy can be abbreviated as -assume noac.
For more information about command line options, see f77(1). If you are using LSE, you can see f77(1) by entering the following command at the LSE prompt:
LSE> cli man f77
Filename
Specifies one (or more) source programs to be compiled. If you specify more than one filename, separate each filename with a space.
The f77 command interprets filename suffixes as follows:
o The suffixes .f, .for, or .FOR are interpreted as FORTRAN-77 source programs. These programs are compiled, and the name of the resulting object program is the basename of the source file with a .o substituted for the .f, .for, or .FOR. (For example, in source file myfile.f, myfile is the basename; therefore, the object program is named myfile.o.) If the source program is compiled and loaded, the .o file is deleted.
o The suffix .F is interpreted as a FORTRAN source program which must be processed by the C preprocessor (cpp(1)) before being compiled.
o The suffixes .r or .e are interpreted as ratfor or efl source programs, respectively. These programs are first transformed by the appropriate preprocessor and then compiled.
o The suffix .i is interpreted as a FORTRAN-77 source program that has been preprocessed by cpp(1). It is compiled without further preprocessing.
o The suffixes .o or .a are interpreted as object files or archive libraries, respectively. Object files are passed to the ld linker. Archive libraries are searched by the ld linker.
If you omit a filename suffix (or the suffix is not .f, .for, .FOR, or .o), the compiler assumes the file is an object file and passes it directly to the linker.
When a source program requires preprocessing by cpp(1), efl(1), ratfor(1), or m4(1), the name of the output file generated by the preprocessor consists of the basename of the source input file with the appropriate preprocessor suffix. For example:
m4 myfile.r => myfile.p efl myfile.e => myfile.f ratfor myfile.r => myfile.f cpp myfile.F => myfile.i
Note that if you have myfile.F and myfile.f as distinct files, cpp(1) overwrites myfile.f to produce an output file with the same name.
Depending on which platform you are using, the f77 command defines the following cpp(1) macros to cpp(1):
o All platforms: LANGUAGE_FORTRAN, __LANGUAGE_FORTRAN__, unix, __unix__
o RISC only: host_mips, __host_mips__
o AXP only: __alpha
o DEC OSF/1 only: __osf__
o RISC DEC OSF/1 only: mips=1, __mips__=1
o RISC ULTRIX only: MIPSEL, mips, __mips__
For example, if you are using an AXP DEC OSF/1 system, the following cpp(1) macros are defined to cpp(1): LANGUAGE_FORTRAN, __LANGUAGE_FORTRAN__, unix, __unix__, __alpha, and __osf__.
Indicate either special actions to be performed by the compiler or linker, or special properties of input or output files.You can override some options specified on the command line by using the OPTIONS statement, the AUTOMATIC and STATIC statements, and directives (CDEC$) in your FORTRAN source program. The options specified by the OPTIONS statement affect only the program unit where the statement occurs.
For descriptions of all command line options, see f77(1) by entering the following command at the LSE prompt:
LSE> cli man f77
1. % f77 -V aaa.f bbb.f ccc.fThis command causes the files aaa.f, bbb.f, and ccc.f to be compiled into one temporary object file, which is then passed to the ld linker. The ld linker produces the executable file a.out. The -V option causes the compiler to create the listing file aaa.1.
2. % f77 -o foo ax.f bx.f cx.f
This command causes the files ax.f, bx.f, and cx.f to be compiled as one program, with the resulting executable file foo.
3. % f77 -c -O4 ax.f bx.f cx.f
This command causes the files ax.o, bx.o and cx.o to be created. Inter-procedural optimization is hindered because these input files are separately compiled.
4. % f77 -c -o foo.o -O4 ax.f bx.f cx.f
This command causes the files ax.f, bx.f and cx.f to be compiled as one program, with the resulting object file foo.o. This produces better optimization.
For DEC Fortran release notes, refer to:
Built-in functions perform utility operations that are useful in communicating with subprograms written in languages other than Fortran.See also Intrinsic_Functions.
DEC Fortran supports the following characters:o The Fortran character set, consisting of those ASCII characters which can appear in Fortran language syntax and which is a superset of the FORTRAN-77 standard character set. This set includes space and tab characters.
o Other printable characters, which may appear in comments and character and Hollerith constants.
o Nonprintable characters.
DEC Fortran provides the following language features to facilitate compatibility with other versions of Fortran:o The DEFINE FILE, ENCODE, DECODE, and FIND statements
o A NOF77 interpretation of the EXTERNAL statement
o Octal forms of integer constants
o An alternative syntax for the PARAMETER statement
o The VIRTUAL statement
o The AND, OR, XOR, IMAG, LSHIFT, and RSHIFT intrinsic functions
o An alternative syntax for bit constants
o C-style escape sequences
o An alternative syntax for a record specifier
These language features are particularly useful in transporting older Fortran programs to systems on Alpha AXP or RISC processors. However, you should avoid using them in new programs on these systems, and in new programs for which portability to other FORTRAN-77 implementations is important.
Each constant, variable, array, expression, or function reference in a Fortran statement represents typed data. The data type of these items can be inherent in their constructions, implied by convention, or explicitly declared. The data types available in Fortran are integer, REAL (REAL*4), DOUBLE PRECISION (REAL*8), COMPLEX (COMPLEX*8), DOUBLE COMPLEX (COMPLEX*16), BYTE (equivalent to INTEGER*1), logical, character, and Hollerith.Constants, variables, arrays, scalar fields, aggregate fields, character substrings, and expressions can be specified in many places in a Fortran program. Fortran statements and expressions have individual restrictions governing which of these items can used in them and in what form. Thus, to avoid repeatedly enumerating lists of the various items that can be specified with the various statements and expressions, the items are divided into four general categories: scalar reference, scalar memory reference, array name reference, and aggregate reference. The names of these categories are used throughout the DEC Fortran Language Reference Manual to identify what can be included in a particular statement or expression.
A FORMAT statement specifies the format in which data is to be transferred as well as the conversion (editing) required to achieve that format. FORMAT statements are nonexecutable statements used with formatted I/O statements and with ASSIGN, ENCODE, and DECODE statements.Fields defined by a FORMAT statement can contain variable format expressions. A variable format expression is an integer variable or expression enclosed in angle brackets that takes the place of an integer constant. The value of the variable or variables can change during program execution.
Each Fortran line has the following four fields:Statement label field Columns 1-5 Continuation indicator field Column 6 Statement field Columns 7-72 (if you specify the EXTEND_SOURCE compiler option or OPTIONS/EXTEND_SOURCE, statements extend to column 132) Sequence number field Columns 73-80
There are two ways to code a Fortran line: standard formatting and tab formatting. You may prefer to use the standard formatting when program portability to other systems is necessary. The tab formatting method is convenient when you are entering lines at a terminal with a text editor.
Statements in a Fortran program unit follow a required order. In the following figure, vertical lines separate statement types that can be interspersed. For example, DATA statements can be interspersed with executable statements. Horizontal lines indicate statement types that cannot be interspersed. For example, type declaration statements cannot be interspersed with executable statements.
+-------+--------------------------------------------------------+ | | OPTIONS Statement | | |--------------------------------------------------------| | |PROGRAM, FUNCTION, SUBROUTINE, or BLOCK DATA Statements | | |--------+-----------------------------------------------| |COMMENT| | IMPLICIT NONE Statement | | Lines,| |-------------------------------+--------------| |INCLUDE|NAMELIST,| IMPLICIT Statements | | | State-| FORMAT, |------+------------------------| PARAMETER | | ments,| & | | Other Specification | Statements | |& Gen- | ENTRY | DATA | Statements, | | | eral | State- |State-| DICTIONARY Statements | | |Direc- | ments | ments|------------------------+--------------| | tives | | | Statement Function Definitions | | | | |---------------------------------------| | | | | Executable Statements | |-------+---------+------+---------------------------------------| | END Statement | +----------------------------------------------------------------+
This glossary contains terms that are commonly used in your DEC Fortran language reference manual and user manual. The terms and short descriptions are informative and are not part of the standard definition of the Fortran programming language.