hp Fortran compiler migration impacts summary
 |
| |
|

HP Fortran 77 has been discontinued, and is no longer available. If
you have not migrated your Fortran software off HP Fortran77, you
should start planning to make this migration immediately. HP Fortran is
available on HP-UX 11.0/11i on PA platforms, and on HP-UX 11i on IPF.
HP Fortran is based on the Fortran95 standard, and supports 64-bit
executables.
|
HP Fortran is generally compatible with the older standards-conforming HP
Fortran 77. Source files and object files from existing HP Fortran 77
applications can be compiled and linked by HP Fortran with comparatively
little effort. However, some compile-line options and non-standard extensions
in HP Fortran 77 programs may require modification.
If you are using Ratfor, you can use the Ratfor preprocessor to convert
your Ratfor source files to Fortran and then port to HP Fortran.
HP Fortran includes a number of extensions that are compatible with HP
Fortran 77 and with other vendors' Fortran dialects. For a list of all HP
Fortran extensions, see the HP Fortran 90 Programmer's Reference, Appendix A.
Although HP Fortran and HP Fortran 77 are generally compatible, a few
areas may cause transition impacts in your source code:
- Object file incompatibility: If you used the LOGICAL directive or
Convex fc compile objects, you must recompile your source
code.
- Source incompatibilities: Changes in specifiers, statements, and
directives may cause impacts in your source code. Many non-standard Fortran
77 compiler directives are not supported in HP Fortran. For example, this
incompatible ACCESS specifier for OPEN:
OPEN(40, ACCESS='append', ...)
must be changed to:
-
OPEN(40, POSITION='append', ...)
- Command incompatibilities: Option and function changes may cause
impacts in your code. For example, you must now use +dlines
instead of the -D space option.
- Syntax: HP Fortran has more restrictive syntax, and does not allow
constructs that were legal in Fortran 77. For example, in Fortran 77,
placeholder commas are allowed:
write (3, 10), x
In HP Fortran, they are not allowed:
write (3, 10) x
HP Fortran also provides new features such as:
- Free format code, as well as the fixed format of Fortran 77
- Full array language, including array expressions and operations, array
intrinsics, and array valued functions
- New pointer syntax
- Support for memory allocation and deallocation
- Modular definitions
- Derived types
- Nested procedures
- User-defined operations and operator overloading
- Interfaces, with ability to specify full interface to a procedure
- New control statements: CASE, CYCLE,
EXIT, DO FOREVER
- Named IF and DO statements
- Non-advancing I/O
- New type declaration syntax
- WHERE statement
- fid (Fortran Incompatibility Detector)
- Use of
>,<,>=,<=,==,
/=
Note: To include only HP Fortran compiler migration impacts when
running the scansummary and scandetail tools, use
the option:
+C F90
To exclude these impacts, use the option:
-C F90
For more information on filtering output in reports, see Customizing Your Scan.
|
|