HP Fortran Programmer's Guide (March 2010)

Migrating to HP Fortran
Incompatibilities with HP FORTRAN 77
Chapter 10234
The syntax and functionality of individual directives has also changed; for detailed
information about the HP Fortran directives, see the HP Fortran Programmer's Reference.
All unsupported directives should be deleted or replaced by HP Fortran code that results in
the same functionality (see Table on page 236).
Miscellaneous
Following are miscellaneous incompatibilities between HP Fortran and HP FORTRAN 77:
The syntax and functionality of the HP Fortran version of the ON statement is different
from the HP FORTRAN 77 version. For example, ON EXTERNAL and ON INTERNAL are not
supported in HP Fortran. For information about using the ON statement, see the “Using
the ON statement” on page 127.
HP FORTRAN 77 accepts statement functions that convert arguments; HP Fortran does
not.
HP FORTRAN 77 accepts the { character as comment syntax; HP Fortran does not.
HP FORTRAN 77 accepts a PROGRAM statement with no name; HP Fortran requires the
name.
HP FORTRAN 77 extends the PROGRAM statement to enable access to command-line
arguments; HP Fortran does not. For information about how to use intrinsics to access
command-line arguments, see “Accessing command-line arguments” on page 174.
HP FORTRAN 77 supports arrays up to rank 20; HP Fortran supports arrays up to rank
7.
HP FORTRAN 77 accepts an expression like + -A, but HP Fortran generates a syntax
error. Use +(-A) instead.
HP FORTRAN 77 does not print leading zeroes in floating-point numbers; HP Fortran
does. This behavior is equivalent to compiling an HP FORTRAN 77 program with the +E4
option (note that this option is not supported by f90).
In HP FORTRAN 77, integers that overflow (through initialization or constant folding)
are replaced with the maximum value for that type. If HP Fortran detects integer
overflow, it treats it as an error; if it does not detect it, the overflow value is truncated at
runtime.