FORTRAN Reference Manual

Converting Programs to HP FORTRAN
FORTRAN Reference Manual528615-001
C-5
FORTRAN. Use an editor to find all such occurrences and replace them with forms
that are acceptable to HP FORTRAN.
Some FORTRAN implementations also provide octal and hexadecimal conversions
in formatted I/O, again with a variety of syntaxes. HP FORTRAN provides octal and
hexadecimal conversions, but the HP-defined syntax might vary from the syntax
used in your program. Use an editor to find all such occurrences and replace them
with forms that are acceptable to HP FORTRAN.
Converting ENCODE and DECODE statements
Some FORTRAN implementations support the ENCODE and DECODE statements
as extensions to the ANSI FORTRAN 66 standard. These were replaced in the
ANSI FORTRAN 77 standard by the “internal file” feature, that is, the use of a type
CHARACTER variable in place of the unit number in a READ or WRITE statement.
You can do likewise if you encounter any ENCODE or DECODE statements in
programs you are converting.
Converting NAMELIST I/O
Some FORTRAN implementations support NAMELIST I/O as an extension to the
ANSI FORTRAN 66 standard. NAMELIST I/O was omitted from the ANSI
FORTRAN 77 standard because it was used so infrequently. NAMELIST I/O is not
included in HP FORTRAN. Programs that use this feature can be difficult to
convert to HP FORTRAN.
Intrinsic functions and logical operators
Some FORTRAN implementations support the intrinsic functions AND, OR, XOR,
and COMPL, and/or the use of logical operators .AND., .OR., .XOR., and .NOT., to
perform bitwise masking operations on INTEGER or REAL values, as extensions
to the ANSI FORTRAN 66 standard. Neither ANSI FORTRAN 77 standard nor HP
FORTRAN support this capability. You can write TAL subprograms for the AND,
OR, XOR, and COMPL functions.
Direct-access READ and WRITE statements
Some FORTRAN implementations support direct-access READ and WRITE
statements of the form
READ (u ' rn [ , ERR = label ] ) datalist
WRITE (u ' rn [ , ERR = label ] ) datalist
where u is an I/O unit number and
rn is a record number,
as extensions to the ANSI FORTRAN 66 language. These were replaced in ANSI
FORTRAN 77 by the statement forms
READ (u, REC = rn [ , ERR = label ] ) datalist
WRITE (u, REC = rn [ , ERR = label ] ) datalist