HP Fortran Programmer's Guide (B3908-90031; September 2011)
Migrating to HP Fortran
Incompatibilities with HP FORTRAN 77
Chapter 10224
Data types and constants
The following HP FORTRAN 77 extensions for data types and constants are not supported by HP Fortran:
• Double precision as the default storage for floating-point constants; see “Floating-point constants” on
page 222.
• I and J integer suffixes. To express the HP FORTRAN 77 constant 10I (or I*2) in HP Fortran, use
10_2; for 10J (or J*4), use 10_4.
•Use of the 8#n and 16#n for octal and hex constants, respectively. In HP Fortran, use O"n" for octal
constants and Z"n" for hexadecimal constants.
• BOZ constants (that is, constants in binary, octal, or hexadecimal format) in COMPLEX expressions.
• Non-integer array bounds and character length specifiers.
• Constant expressions that contain the ** (exponentiation) operator, as in PARAMETER (RV=1**1.2).
•Use of the PARAMETER statement without parentheses, as in
PARAMETERi=1
In free format, f90 treats this statement as an error. In fixed format, f90 treats it as an assignment,
identical to:
PARAMETERi = 1
In HP Fortran, use PARAMETER (i=1) instead.
•Use of the DATA statement to initialize integers with strings, as in:
DATA i /"abcd"/
•Use of COMPLEX(16) temporaries. For example, given the declarations:
COMPLEX(KIND=8) :: foo
REAL(KIND=16) :: bar
the expression foo**bar is legal in HP FORTRAN 77 but not in HP Fortran. (HP FORTRAN 77
coerces COMPLEX(16) entities to COMPLEX(8) in order to continue the computation.)
Given the previous declarations, the following is acceptable in HP Fortran:
foo**REAL(bar, 8) ! foo**bar
See the HP Fortran Programmer's Reference for information about the REAL intrinsic.
Input/output
The following I/O specifiers are recognized by the OPEN statement and by other I/O statements in
HP FORTRAN 77 but are not supported in HP Fortran: