HP 3000 Manuals

New Features [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Migration Guide

New Features 

Many features not available in HP FORTRAN 77/V are added in HP FORTRAN
77/iX. These are outlined below.  For complete information about any of
these features, see the HP FORTRAN 77/iX Reference manual.

HP3000_16 Directive 

The HP3000_16 compiler directive specifies various options for
compatibility with HP FORTRAN 77/V. These are the options:

   $HP3000_16 REALS           Specifies MPE V format for floating-point
                              data.

   $HP3000_16 ALIGNMENT       Specifies alignment of noncharacter data on
                              16-bit boundaries.

   $HP3000_16 STRING_MOVE     Specifies that overlapping character
                              strings are moved.

   $HP3000_16 ON              Specifies all the above options.

   $HP3000_16                 Same as $HP3000_16 ON.

   $HP3000_16 OFF             Specifies none of the above options.

These options apply to an entire program unit and may not be changed
within a program unit.  For best results, compile entire programs with a
consistent list of HP3000_16 options either by placing the directive
before any other statements at the beginning of each source file, or by
passing the option to the compiler through the INFO string.

OPTIMIZE Directive 

The OPTIMIZE directive specifies optimization of object code.  The
directive provides these levels of code optimization:

   $OPTIMIZE OFF                        Level 0 optimization (does no
                                        optimizing).  This is the
                                        default.

   $OPTIMIZE ON                         Same as $OPTIMIZE LEVEL2.

   $OPTIMIZE LEVEL1                     Optimizes only within each basic
                                        block.

   $OPTIMIZE LEVEL2                     Level 2 optimization with the
                                        following ASSUME settings:

                                        ASSUME_NO_PARAMETER_OVERLAPS  ON

                                        ASSUME_PARM_TYPES_MATCHED     ON

                                        ASSUME_NO_EXTERNAL_PARMS      ON

                                        ASSUME_NO_SIDE_EFFECTS        OFF

                                        See below for ASSUME
                                        descriptions.

   $OPTIMIZE LEVEL2_MIN                 Level 2 optimization with all the
                                        ASSUME settings at OFF.

   $OPTIMIZE LEVEL2_MAX                 Level 2 optimization with all the
                                        ASSUME settings at ON.

   $OPTIMIZE ASSUME_NO_PARAMETER_OVERLAPS    No actual parameters passed
                                             to a subprogram overlap each
                                             other.

   $OPTIMIZE ASSUME_NO_SIDE_EFFECTS          The current subprogram
                                             changes only local
                                             variables.  It does not
                                             change any variables in
                                             COMMON, nor does it change
                                             parameters.

   $OPTIMIZE ASSUME_PARM_TYPES_MATCHED       All of the actual parameters
                                             passed were the type
                                             expected by this subprogram.

   $OPTIMIZE ASSUME_NO_EXTERNAL_PARMS        None of the parameters
                                             passed to the current
                                             subprogram are from an
                                             external space, that is,
                                             different from the user's
                                             own data space.  Parameters
                                             can come from another space
                                             if they come from operating
                                             system space or if they are
                                             in a space shared by other
                                             users.

For further details about the OPTIMIZE directive and its options, see the
HP FORTRAN 77/iX Programmer's Guide.

SYMDEBUG Directive 

The MPE/iX operating system provides symbolic debugging for HP FORTRAN
77/iX programs.  If the SYMDEBUG directive is used, the compiler inserts
debugging information in the object file.  Symbolic debugging is not
compatible with code optimization; therefore, do not use both $SYMDEBUG
and $OPTIMIZE.

LOCALITY Directive 

The LOCALITY directive allows you to group procedures together in virtual
memory to maximize throughput and minimize system overhead.  LOCALITY is
similar to the SEGMENT directive of HP FORTRAN 77/V. However, unlike
SEGMENT, which is required in HP FORTRAN 77/V when large programs must be
broken into segments, the LOCALITY directive is not required in HP
FORTRAN 77/iX. HP FORTRAN 77/iX handles memory management transparently.

EXTERNAL_ALIAS and LITERAL_ALIAS Directives 

The EXTERNAL_ALIAS and LITERAL_ALIAS directives allow you to redefine the
names of functions and subroutines within a program unit.

UPPERCASE and LOWERCASE Directives 

The UPPERCASE and LOWERCASE directives allow you to turn on or off
shifting to uppercase or lowercase in FORTRAN 77 external names.

ON Statement and INTEGER*2 Conditions 

In MPE/iX, ON statements specifying trap handling for INTEGER*2
conditions are enabled only when the $CHECK_OVERFLOW INTEGER_2 option
(which is the default) is on.  This restriction also applies to trap
handling for INTEGER conditions if the $SHORT option is on.



MPE/iX 5.0 Documentation