Syntax:
The /fpscomp option controls whether certain aspects of the run-time system and semantic language features within the compiler are compatible with Visual Fortran or Microsoft Fortran PowerStation.
If you experience problems when porting applications from Fortran PowerStation, specify /fpscomp:keyword (or /fpscomp:all). When porting applications from Compaq Fortran, use /fpscomp:none or /fpscomp:libs (the default).
In the visual development environment, specify the PowerStation 4.0 Compatibility Options in the Compatibility Compiler Option Category. The /fpscomp options and their visual development environment names are:
/fpscomp:[no]filesfromcmd (Filenames from Command Line) |
/fpscomp:[no]general (Other Run-time Behavior) |
/fpscomp:[no]ioformat (I/O Format) |
/fpscomp:[no]ldio_spacing (List Directed I/O Spacing) |
/fpscomp:[no]libs (Libraries) |
/fpscomp:[no]logicals (Logical Values) |
/fpscomp:[no]symbols (Predefined Preprocessor Symbols) |
/fpscomp:all and /fpscomp |
/nofpscomp or /fpscomp:none |
Specifying /fpscomp:filesfromcmd for a file where the OPEN statement FILE specifier is blank (FILE=' '), requests that the following actions be taken at run-time:
Specifying /fpscomp:nofilesfromcmd disables the run-time system from using the filename specified on the command line when the OPEN statement FILE specifier is omitted, allowing the application of default directory, file name, and extensions like Compaq Fortran, such as the FORTn environment variable and the FORT.n file name (where n is the unit number).
Specifying /fpscomp:filesfromcmd affects the following Fortran features:
For example, assume a program OPENTEST contains the following statements:
OPEN(UNIT = 2, FILE = ' ')
OPEN(UNIT = 3, FILE = ' ')
OPEN(UNIT = 4, FILE = ' ')
The following command line assigns the file
TEST.DAT to Unit 2, prompts the user for a filename to associate with Unit 3, then prompts
again for a filename to associate with Unit 4:opentest test.dat '' ''
Unopened files referred to in READ or WRITE statements are opened implicitly as if there had been an OPEN statement with a name specified as all blanks. The name is read from the command line.
WRITE(UNIT = 8, FMT='(2I5)') int1, int2 ! Where "8" has not been
! explicitly associated with a file.
For more information about running Visual Fortran programs with the /fpscomp:filesfromcmd option or the use of alternative routines, see Running Fortran Applications.
Specifying /fpscomp:[no]general controls which run-time behavior is used when a difference exists between Visual Fortran and Microsoft Fortran PowerStation and either semantic must remain available for compatibility reasons:
This affects the following Fortran features:
Note: Allowing files that are not opened with sequential access (such as ACCESS='DIRECT') to be used with the BACKSPACE statement violates the Fortran 90 standard and may be removed in the future. Section 9.5 states the following: "A file that is not connected for sequential access must not be referred to by a BACKSPACE, an ENDFILE, or a REWIND statement..."
READ(eunit, format [, advance][, iostat]...)
Note: Allowing files that are not opened with sequential access (such as ACCESS='DIRECT') to be used with the sequential READ statement violates the Fortran 90 standard and may be removed in the future. Section 9.2.1.2.2 states the following: "Reading and writing records is accomplished only by direct access input/output statements."
READ(eunit [, iostat]...)
Note: Allowing files that are not opened with sequential access (such as ACCESS='DIRECT') to be read with the sequential READ statement violates the Fortran 90 standard and may be removed in the future. Section 9.2.1.2.2 states the following: "Reading and writing records is accomplished only by direct access input/output statements."
Note: Returning the value "NO" instead of "UNKNOWN" for this specifier violates the Fortran 90 standard and may be removed in the future. See Section 9.6.1.12.
OPEN (UNIT = 4)
WRITE(eunit, format [, advance][, iostat]...)
When writing to a formatted file opened for direct access, records are written in the same record type format as Fortran PowerStation when /fpscomp:general is set. This consists of adding the trailing Carriage Return/Line Feed pair (<CR><LF>) that is part of the record.
Ignores the CARRIAGECONTROL specifier setting when writing to a formatted direct access file.When interpreting Fortran carriage control characters during formatted I/O, carriage control sequences are written which are the same as Fortran PowerStation when /fpscomp:general is set. This is true for the "Space, 0, 1 and + " characters.
When performing non-advancing I/O to the terminal, output is written in the same format as Fortran PowerStation when /fpscomp:general is set.
WRITE(eunit [, iostat]...)
Allows sequential writes from an unformatted file opened for direct access.
Note: Allowing files that are not opened with sequential access (such as ACCESS='DIRECT') to be read with the sequential WRITE statement violates the Fortran 90 standard and may be removed in the future. Section 9.2.1.2.2 states the following: "Reading and writing records is accomplished only by direct access input/output statements."
Controls which run-time behavior is used for the semantic format for list-directed formatted I/O and unformatted I/O. Specify /fpscomp:ioformat to request Microsoft Fortran PowerStation semantic conventions and record formats (see Microsoft Fortran PowerStation Compatible Files). Specify /fpscomp:noioformat to request Compaq Fortran semantic conventions. This affects the following Fortran features:
WRITE(eunit, * [, iostat]...)
WRITE(iunit, * [, iostat]...)
WRITE(eunit, nml-group [, iostat]...)
If /fpscomp:ioformat is set, the output line, field width values, and the list-directed data type semantics are dictated according to the following sample for real constants (N below):
See the Fortran PowerStation documentation for more detailed information about the other data types affected.
WRITE(eunit [, iostat]...)
If /fpscomp:ioformat is set, the unformatted file semantics are dictated according to the Fortran PowerStation documentation. Be aware that the file format differs from that used by Compaq Fortran. See the Fortran PowerStation documentation for more detailed information.
The following table summarizes the default output formats for list-directed output with the intrinsic data types:
Default Formats for List-Directed Output
Data Type | Output Format with /fpscomp:noioformat |
Output Format with /fpscomp:ioformat |
---|---|---|
BYTE | I5 | I12 |
LOGICAL (all) | L2 | L2 |
INTEGER(1) | I5 | I12 |
INTEGER(2) | I7 | I12 |
INTEGER(4) | I12 | I12 |
INTEGER(8) | I22 | I22 |
REAL(4) | 1PG15.7E2 | 1PG16.6E2 |
REAL(8) | 1PG24.15E3 | 1PG25.15E3 |
COMPLEX(4) | '( ',1PG14.7E2, ', ',1PG14.7E2, ') ' |
'( ',1PG16.6E2, ', ',1PG16.6E2, ') ' |
COMPLEX(8) | '( ',1PG23.15E3, ', ',1PG23.15E3, ') ' |
'( ',1PG25.15E3, ', ',1PG25.15E3, ') ' |
CHARACTER | Aw | Aw |
READ(eunit, * [, iostat]...)
READ(iunit, * [, iostat]...)
READ(eunit, nml-group [, iostat]...)
If /fpscomp:ioformat is set, the field width values and the list-directed semantics are dictated according to the following sample for real constants (N below):
See the Fortran PowerStation documentation for more detailed information about the other data types affected.
READ(eunit [, iostat]...)
If /fpscomp:ioformat is set, the unformatted file semantics are dictated according to the Fortran PowerStation documentation. Be aware that the file format to read differs from that used by Compaq Fortran. See the Fortran PowerStation documentation for more detailed information.
For list-directed output, controls whether a blank is inserted at run-time after a numeric value before a character value (undelimited character string). The default is /fpscomp:noldio_spacing, which conforms to the Fortran 95 standard by inserting a blank after a numeric value before a character value. To request non-standard behavior for compatibility with Microsoft Fortran PowerStation and Visual Fortran releases before Version 6.6, either specify /fpscomp:ldio_spacing or specify /fpscomp:general, which sets /fpscomp:ldio_spacing.
Controls whether the library dfport.lib (Portability library) is passed to the compiler and linker. The default is /fpscomp:libs, which passes this library. Specifying /fpscomp:nolibs does not pass this library.
Controls the value used for logical true. Microsoft Fortran PowerStation and Compaq Fortran with the /fpscomp:logical option set uses any non-zero value (default is 1) for true. Compaq Fortran with the /fpscomp:nological option set only looks at the low bit of the value, using a -1 for true. Differences can occur when a logical is stored into an integer. Both use 0 (zero) for false.
This affects the results of all logical expressions and affects the return value for the following Fortran features:
Adds one or more symbols related to Microsoft Fortran PowerStation to preprocessor and compiler invocations. The symbol currently set by specifying /fpscomp:symbols is _MSFORTRAN_=401.
Enable full Microsoft Fortran PowerStation compatibility or /fpscomp:(filesfromcmd,general,ioformat,ldio_spacing,libs,logicals,symbols).
Enables full Compaq Fortran compatibility or /fpscomp:(nofilesfromcmd,nogeneral,noioformat,noldio_spacing,nolibs,nologicals,nosymbols).
If you omit /fpscomp, the default is /fpscomp:libs.
The /fpscomp and /vms options are not allowed in the same command.