Compaq Fortran 77 Release Notes for OpenVMS VAX Systems
 *HyperReader
  Next     Previous     Contents     Examples     Tables     Close     Help  
  2.2  New and Changed Features in V6.4

  This section provides highlights of new and changed features
  in Compaq Fortran 77 V6.4.

  2.2.1  STRUCTURE and COMMON Alignment

  Compaq Fortran 77 now supports all STRUCTURE and
  COMMON alignment features of Digital Fortran for
  OpenVMS Alpha Systems, including:

  *   The ability to request that fields in a STRUCTURE be
      aligned on natural address boundaries.

  *   The ability to request that COMMON elements be aligned
      on natural address boundaries.

  *   The ability to request that the compiler warn when a
      STRUCTURE field falls falls on an unaligned address
      boundary.

  *   The ability to request that COMMON blocks have their
      length padded out to multiples of the COMMON block's
      alignment.

  In addition, Compaq Fortran 77 supports the ability to selec-
  tively disable alignment warnings for specific STRUCTURE
  and COMMON declarations.  This feature will be added to
  future versions of Digital Fortran on other platforms.

                                Note

      The defaults for STRUCTURE alignment and align-
      ment warnings have     not changed and are differ-
      ent from the defaults used by Digital Fortran for
      OpenVMS Alpha Systems.

  The following sections describe the specific alignment-related
  features in Compaq Fortran 77.

  2.2.1.1  /ALIGN Compile Command Qualifier

  Compaq Fortran 77 now supports the /ALIGN compile com-
  mand qualifier using the same syntax as Digital Fortran for

  OpenVMS Alpha Systems.  For further information about the
  syntax and semantics of the qualifier, see the  DEC Fortran
  Language Reference Manual      or type:

  $ HELP  FORTRAN  /ALIGN

  at the DCL prompt.  Note that the default is that STRUCTUREs
  are packed, unlike Digital Fortran for OpenVMS Alpha
  which aligns fields in STRUCTUREs by default.  COMMON
  blocks are packed by default on both platforms.

  To provide for correct execution of programs which use
  packed structures from SYS$LIBRARY:FORSYSDEF.TLB,
  even in the presence of /ALIGN=STRUCTURES=NATURAL,
  declarations in FORSYSDEF.TLB have been modified to in-
  clude bracketing CDEC$ OPTIONS directives to disable
  alignment for structures declared within.

  If you specify /ALIGN=STRUCTURES=NATURAL and use

  INCLUDE files which declare structures that require packed
  allocation, be sure to bracket the INCLUDE line as follows:

  CDEC$  OPTIONS  /NOALIGN  /WARN=NOALIGN
        INCLUDE  'include-file'
  CDEC$  END  OPTIONS

  2.2.1.2  /WARNINGS=ALIGNMENT Supports STRUCTUREs

  The /WARNINGS=ALIGNMENT compile command quali-
  fier now controls alignment warnings for uses of structures
  with misaligned fields.  In previous versions, only non-
  aggregate variables were checked for possible alignment
  warnings.

  2.2.1.3  CDEC$ OPTIONS Directive

  Compaq Fortran 77 now supports the CDEC$ OPTIONS
  (and CDEC$ END OPTIONS) directives as documented in
  the DEC Fortran Language Reference Manual       .

  In addition, the CDEC$ OPTIONS directive may optionally
  specify one of the following:

      /WARNINGS=ALIGNMENT

      /WARNINGS=NOALIGNMENT
      /WARNINGS
      /NOWARNINGS

  /WARN is equivalent to /WARNINGS=ALIGNMENT,
  /NOWARN is equivalent to /WARNINGS=NOALIGNMENT.
  This qualifier enables or disables alignment warnings for

  STRUCTUREs and COMMONs declared within the scope of
  the CDEC$ OPTIONS directive.  Note that alignment warn-
  ings are not given if /WARNINGS=NOALIGNMENT is
  specified (or defaulted) on the compile command line, even
  if warnings are enabled by a CDEC$ OPTIONS directive.
  This directive qualifier is useful for suppressing alignment
  warnings for structures you know contain misaligned fields.

  This feature will be supported by future versions of Digital
  Fortran on other platforms.

  2.2.1.4  CDEC$ PSECT MULTILANGUAGE Keyword

  The CDEC$ PSECT directive now accepts the keywords
  MULTILANGUAGE and NOMULTILANGUAGE, in a
  manner compatible with Digital Fortran on other platforms.

  This controls whether or not the total length of a COMMON
  block is padded to a multiple of the block's PSECT alignment.
  The default is NOMULTILANGUAGE which specifies that
  no padding is to be done.  If MULTILANGUAGE is speci-
  fied, the COMMON block's length is padded to be an integral
  multiple of the associated PSECT alignment, up to octa-
  word (16 bytes).  For example, if a COMMON block contains
  three REAL   *4 variables, and the default PSECT alignment of
  quadword (8 bytes) is in effect, the length of the COMMON
  block would be 12 bytes long with NOMULTILANGUAGE,
  but padded at the end out to 16 bytes if MULTILANGUAGE
  was specified.

  The default for all COMMON blocks can be specified by us-
  ing the /ALIGN=COMMONS=[NO]MULTILANGUAGE
  command line qualifier.  Note that this setting is not available
  on the CDEC$ OPTIONS /ALIGN qualifier.

  2.2.2  /ASSUME=BYTERECL Command and OPTIONS
         Qualifier
  Compaq Fortran 77 now supports the /ASSUME=BYTERECL
  qualifier on the command line and on the OPTIONS state-
  ment.  This controls the size of the unit used for the RECL=
  keyword in an OPEN or INQUIRE statement for unformat-
  ted files.  The default, NOBYTERECL, specifies that RECL
  is in units of 4-byte longwords, compatible with current and
  past Digital Fortran products.  If BYTERECL is specified, the
  unit for RECL is one byte, which is used on some non-Digital
  platforms.

  Use of the non-default BYTERECL value requires that the
  application be running on a system which has the associated

  Fortran Run-Time Library support.  This support is provided
  by installing one of the following:

      Compaq Fortran 77 version V6.4 or later

      OpenVMS VAX V7.0 or later
      Fortran Run-Time Library ECO FORRTLVE03062.
      This can be obtained through the Internet at    http:

      //www.service.digital.com/html/patch_public.html     -
      search for FORRTLVE03062.

  If a program which specifies /ASSUME=BYTERECL is run
  on a system without the proper Run-Time Library support, it
  will fail with an INVARGFOR, Invalid argument to Fortran
  Run-Time Library error.

  2.2.3  CDEC$ PSECT ALIGN= Keywords Supported
  The CDEC$ PSECT ALIGN= specifier now supports the
  keywords BYTE, WORD, LONG, QUAD, OCTA and PAGE in
  addition to the integer constant expression previously allowed.
  These keywords are equivalent to the constants 0, 1, 2, 3, 4
  and 9, respectively.  This feature will be supported by a fu-
  ture version of Digital Fortran for OpenVMS Alpha Systems,
  where the keyword PAGE will be treated as if it were the
  constant 16 (the largest page size on OpenVMS Alpha is
  2  16 bytes.)
   **

  2.2.4  DPROD Intrinsic Now Generic
  The DPROD intrinsic function has been extended to oper-
  ate as a generic function which can accept arguments of
  types REAL  *4 or REAL   *8 (both arguments must be the same
  type.)  If the arguments to DPROD are REAL       8, the function
                                                  *
  result is of type REAL *16.  Note that if the DPROD intrinsic
  name is passed as an actual argument, the routine passed is
  the version with a REAL   *8 function result.

  2.2.5  Use of POINTER Variables in DEBUG
  Compaq Fortran 77 now correctly describes pointees, de-
  clared in a POINTER statement, in the Debug Symbol Table
  information for use with the OpenVMS Debugger.  However,
  prior to OpenVMS VAX V7.1, the debugger does not con-
  tain full support for pointer-type variables in Fortran.  Scalar
  numeric pointees can be examined by prefacing the pointee
  variable name with the "@" character.  For example, given
  the following declarations:

        REAL  X
        POINTER  (P,X)

  you could use the DEBUG command         E @X to examine the
  contents of X (pointed to by P). If the pointee has a character,
  array or record type, however, the debugger will not prop-
  erly access the contents.  Until the debugger is enhanced in
  this area, a suitable workaround is to tell the debugger that
  the language is Pascal, by means of a    SET LANGUAGE PASCAL
  DEBUG command, and use Pascal syntax, as follows:

  *   Place a caret "^" after the pointee variable name.

  *   Use square brackets "[ ]" instead of parentheses in array
      and character references.

  As in Compaq Fortran 77, a period is used as a record field
  separator.  Also, the debugger will properly use Fortran-
  style column-major order array indexing even though
  the language is set to Pascal.  Note that the debugger does
  not support COMPLEX constants in expressions, but can
  examine COMPLEX variables.

  The following table shows equivalent Pascal syntax for ac-
  cessing various Fortran variable types.

  As of OpenVMS VAX V7.1, the debugger understands

  Fortran pointers.

  Next     Previous     Contents     Examples     Tables     Close     Help     ~Off