FORTRAN 77/XL Enhancements [ COMMUNICATOR 3000/XL XL RELEASE 3.0 ] MPE/iX Communicators
COMMUNICATOR 3000/XL XL RELEASE 3.0
FORTRAN 77/XL Enhancements
by Erryl Johnson
Systems Technology Division
FORTRAN 77/XL (Version A.04.11) has been enhanced by the addition of new
compiler directives and new options to existing directives. These
additions make it easier to migrate from FORTRAN 77 on the HP 1000 and HP
9000 Series 300 and Series 500. Other new options to directives, and a
new intrinsic function, provide increased compatibility with the DEC/VMS
implementation of FORTRAN 77.
HP1000 ENHANCEMENTS
$HP1000 COMPILER DIRECTIVE - This directive specifies options for
compatibility with FORTRAN 7X, which is the version of FORTRAN 77 on the
HP 1000 computer. There are four options.
ARRAYS - When this option is used an array element can be referenced
without specifying all of the subscripts. This option also modifies
the way that character strings are assigned to integer arrays in
DATA statements. In FORTRAN 77/XL when an integer array is
initialized with character strings, a separate string must be
specified for each array element. The ARRAYS option allows more
than one array element to be initialized with a single string.
ALIGNMENT - This option is used when it is desired to have data
layout, that is specified by either EQUIVALENCE or COMMON
statements, to be the same as FORTRAN 7X. This option aligns data on
16-bit boundaries, rather than on the HP FORTRAN 77/XL boundaries.
STRING_MOVE - This option causes assignments of character variables
to be done byte-by-byte, which creates a ripple effect when the
source and target are overlapped.
DO_LOOP - This option allows the index variable of a DO loop to be
modified within the range of the loop. The range of the loop is set
when the loop is entered and is not altered when the index variable
is modified. The index variable is still incremented for each
iteration of the loop.
HP3000 ENHANCEMENTS
$OPTIMIZE LOOP_UNROLL - The LOOP_UNROLL option allows overriding the
default conditions for loop unrolling with level 2 optimization. There
are three sub-options.
COPIES - This option tells the compiler to unroll the loops a
specified number of times.
SIZE - This option tells the compiler to unroll the loops that have
less than a specified number of operations.
STATISTICS - This option provides statistics about the unrolled
loops.
HP9000 ENHANCEMENTS
$HP9000_300, $HP9000_500, $HP9000_800 - These directives are provided for
migration from the HP9000 series 300 and 500. The $HP9000_800 directive
has no function and is provided for compatibility between the 300 and 800
series. There are four options.
LOGICALS - This option provides for compatibility with logical data
of compilers running on the HP9000.
CHARS - This option allows you to pass FORTRAN character parameters
the same way as on the HP9000 series 300 and 500.
ALIGNMENT - This option is used when it is desired to have data
layout specified by either EQUIVALENCE or COMMON statements to be
the same as in HP9000 series 300 or 500 FORTRAN 77. This option
aligns 64-bit data items on 32-bit boundaries.
INTRINSICS - This option, in combination with $SHORT or $LONG,
causes the return types of a set of intrinsics to vary as they do on
the HP9000 series 300 FORTRAN. If $SHORT is in effect these
intrinsics return an INTEGER*2; if $LONG is in effect they return
INTEGER*4. This option has the same effect as the INTRINSIC option
of the $NOSTANDARD directive described below.
DEC/VMS EXTENSIONS
$NOSTANDARD COMPILER DIRECTIVE - Two new options have been added.
INTRINSICS - This option, in combination with $SHORT or $LONG,
causes the return types of a set of intrinsics to vary as they do on
VAX. If $SHORT is in effect these intrinsics return an INTEGER*2; if
$LONG is in effect they return INTEGER*4.
OPEN - This option allows multiple OPENs of the same file with
different unit numbers.
ACCESS = 'APPEND' - This keyword in the OPEN call will cause a file to be
opened for sequential access beginning after the last record of the file.
SIZEOF INTRINSIC - The SIZEOF intrinsic returns the number of bytes of
storage used by the argument.
ADDITIONAL INFORMATION
For more information on all of these enhancements please refer to the
following manuals.
* HP FORTRAN 77/XL Reference Manual (P/N 31501-90010)
* HP FORTRAN 77/XL Quick Reference Guide (P/N 31501-90014)
* HP FORTRAN 77/XL Programmer's Guide (P/N 31501-90011)
MPE/iX Communicators