HP Fortran Programmer Guide HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 (B3908-90032,December 2012)
fidsearches the target source-code file for various HP FORTRAN 77™ extensions that are known
to be incompatible with HP Fortran. It also detects incompatible command-line options when given
anf77 command line. fid reports both source-code and object-code incompatibilities between HP
FORTRAN 77™ and HP Fortran. Furthermore, if fiddetects an incompatible extension whose
functionality is enabled by some other means in HP Fortran, it will suggest a fix.
fidworks by searching the entire program and reporting all its findings at once. Like the
f77command, it expects the target program to conform to HP FORTRAN 77™syntax and will
report syntax errors along with incompatibilities it detects. Unlikef77, however, if fidencounters
a syntax error, it attempts to recover and continue parsing the rest of the program. This recovery
mechanism allows fid to accept programs that contain HP Fortran language features.
Not all incompatibilities are onfid's detection list. Some cannot be found by any automated
means, and others require too much time to compute for even medium-sized programs.
To invoke fid, supply the fidcommand with one or more FORTRAN 77™source files and any
desired f77 options. If a file has been partially migrated to HP Fortran, change its extension to
.ffor use with fid. Following are example command lines:
$ fid +800 file.f
$ fid +es program.f
Following are examples of the warning messages fid issues when it detects an incompatibility:
fid Warning: The command-line option, +800,
is both source incompatible
and .o incompatible with F90
fid Warning on line 8 of file.f: ON EXTERNAL
not supported by F90
fid Warning on line 9 of file.f: Detected IOSTAT
specifier in OPEN statement: Minor
differences exist between F90 and F77
IOSTAT error numbers
The incompatibilities currently detected by fid are:
• The I/O specifiers to the OPEN statement listed in “Input/output” on page 224.
• The HP FORTRAN 77 forms of ON EXTERNAL and ON INTERNAL.
• LOGICAL types used as operands to the .EQ. and .NE. operators.
• All HP FORTRAN 77 compiler directives except those listed in “Directives” on page 225.
• Command-line options that are not supported (see “f77 options not supported by f90” on
page 221) or that have been replaced by f90 options (see Table
on page 221).
NOTE: fid's list of incompatibilities will be periodically updated. For more information about
the fidcommand, see thefid((1)) man page.
138 Migrating to HP Fortran