# H.1 Compaq Fortran Language Extensions

This section summarizes the Compaq Fortran language extensions. Most extensions are available on all supported operating systems. However, some extensions are limited to one or more platforms. If an extension is limited, it is labeled.

Source Forms

The following are extensions to the methods and rules for source forms:

- Tab-formatting as a method to code lines (see Section 2.3.2.2)
- The letter D as a debugging statement indicator in column 1 of fixed or tab source form (see Section 2.3.2)
- An optional statement field width of 132 columns for fixed or tab source form (see Section 2.3.2)
- An optional sequence number field for fixed source form (see Section 2.3.2.1)
- Up to 511 continuation lines in a source program (see Section 2.3)

Names

The following are extensions to the Fortran 90 rules for names (see Section 2.1.2):

- Names can contain up to 63 characters
- The dollar sign ($) is a valid character in names, and can be the first character

Character Sets

The following are extensions to the Fortran 90 character set:

- The Tab (<Tab>) character (see Section 2.2)
- For OpenVMS, Tru64 UNIX, and Linux systems, the DEC Multinational extension to the ASCII character set (see Section C.2)
- For Windows systems (see online Help):
  - Special ASCII and ANSI character sets
  - Key code sets

Intrinsic Data Types

The following are data-type extensions (see Section 3.1):

BYTE | INTEGER*1 | REAL*8 1
LOGICAL*1 | INTEGER*2 | REAL*16 2
LOGICAL*2 | INTEGER*4 | COMPLEX*8
LOGICAL*4 | INTEGER*8 | COMPLEX*16 1
LOGICAL*8 | REAL*4 | COMPLEX*32 2
1 D_floating and G_floating implementations are available on OpenVMS systems only. 2 VMS, U*X

Constants

C strings are allowed in character constants as an extension (see Section 3.1.5.1).

Hollerith constants are allowed as an extension (see Section 3.3.4).

Expressions and Assignment

When operands of different intrinsic data types are combined in expressions, conversions are performed as necessary (see Section 4.1.1.2).

Binary, octal, hexadecimal, and Hollerith constants can appear wherever numeric constants are allowed (see Section 3.3).

The following are extensions allowed in logical expressions (see Section 4.1.4):

- .XOR. as a synonym for .NEQV.
- Integers as valid logical items

Specification Statements

The following specification attributes and statements are extensions:

- AUTOMATIC and STATIC (see Section 5.3)
- VOLATILE (see Section 5.19)

Execution Control

The following control statements are extensions to Fortran 95 (see Chapter 7):

- ASSIGN
- Assigned GO TO
- PAUSE

These are older Fortran features that have been deleted in Fortran 95. Compaq Fortran fully supports these features.

Compilation Control Statements

The following statements are extensions that can influence compilation (see Chapter 14):

- INCLUDE statement format (VMS only):

          INCLUDE '[text-lib] (module-name) [/[NO]LIST]'

- OPTIONS statement:

          /ASSUME = [NO]UNDERSCORE   (Alpha only)

                   {ALL            }
                   {[NO]BOUNDS     }
          /CHECK = {[NO]OVERFLOW   }
                   {[NO]UNDERFLOW  }
                   {NONE           }

          /NOCHECK

                     {BIG_ENDIAN     }
                     {CRAY           }
                     {FDX            }
                     {FGX            }
          /CONVERT = {IBM            }
                     {LITTLE_ENDIAN  }
                     {NATIVE         }
                     {VAXD           }
                     {VAXG           }

          /[NO]EXTEND_SOURCE
          /[NO]F77

                   {D_FLOAT   (VMS only)  }
          /FLOAT = {G_FLOAT   (VMS only)  }
                   {IEEE_FLOAT            }

          /[NO]G_FLOATING   (VMS only)
          /[NO]I4
          /[NO]RECURSIVE

Built-In Functions

The %VAL, %REF, %DESCR (VMS only), and %LOC built-in functions are extensions (see Section 8.8.9).

I/O Statements

The following I/O statements and specifiers are extensions:

- REWRITE statement (see Section 10.7)
- ACCEPT statement (see Section 10.4)
- TYPE statement; a synonym for the PRINT statement (see Section 10.6)
- A key-field-value specifier as a control list parameter (VMS only) (see Section 10.2.1.5)
- A key-of-reference specifier as a control list parameter (VMS only) (see Section 10.2.1.6)
- Indexed READ statement (VMS only) (see Section 10.3.3)
- Indexed WRITE statement (VMS only) (see Section 10.5.3)

I/O Formatting

The following are extensions allowed in I/O formatting:

- The Q edit descriptor (see Section 11.3.9)
- The dollar sign ($) edit descriptor (see Section 11.3.8 and carriage control character (see Section 11.7)
- The backslash (\) edit descriptor (see Section 11.3.8)
- The ASCII NUL carriage control character (see Section 11.7)
- Variable format expressions (see Section 11.6)
- The H edit descriptor (see Section 11.4.2)

  This is an older Fortran feature that has been deleted in Fortran 95. Compaq Fortran fully supports this feature.

File Operation Statements

The following statement specifiers and statements are extensions (see Chapter 13 for details on Tru64 UNIX, Linux, and Windows systems; Chapter 12 for details on OpenVMS systems):

- CLOSE statement specifiers:
  - STATUS values: 'SAVE' (as a synonym for 'KEEP'), 'PRINT', 'PRINT/DELETE', 'SUBMIT', 'SUBMIT/DELETE'
  - DISPOSE (or DISP)
- DELETE statement
- INQUIRE statement specifiers:
  - ACCESS value: 'KEYED' (VMS only)
  - BINARY (WNT, W9*)
  - BLOCKSIZE
  - BUFFERED
  - CARRIAGECONTROL
  - CONVERT
  - DEFAULTFILE
  - FORM values: 'UNKNOWN', 'BINARY'(WNT, W9*)
  - IOFOCUS (WNT, W9*)
  - KEYED (VMS only)
  - MODE as a synonym for ACTION (WNT, W9*)
  - ORGANIZATION
  - RECORDTYPE
  - SHARE (WNT, W9*)
- OPEN statement specifiers:
  - ACCESS values: 'KEYED' (VMS only), 'APPEND'
  - ASSOCIATEVARIABLE
  - BLOCKSIZE
  - BUFFERCOUNT
  - BUFFERED
  - CARRIAGECONTROL
  - CONVERT
  - DEFAULTFILE
  - DISPOSE
  - EXTENDSIZE (VMS only)
  - FORM value: 'BINARY'
  - INITIALSIZE (VMS only)
  - IOFOCUS (WNT, W9*)
  - KEY (VMS only)
  - MAXREC
  - MODE as a synonym for ACTION (WNT, W9*)
  - NAME as a synonym for FILE
  - NOSPANBLOCKS (VMS only)
  - ORGANIZATION
  - READONLY
  - RECORDSIZE as a synonym for RECL
  - RECORDTYPE
  - SHARE (WNT, W9*)
  - SHARED
  - TITLE (WNT, W9*)
  - TYPE as a synonym for STATUS
  - USEROPEN
- UNLOCK statement

Compiler Directives

The following general directives are extensions (see Section 15.1):

- ALIAS
- ATTRIBUTES
- DECLARE and NODECLARE
- DEFINE and UNDEFINE
- FIXEDFORMLINESIZE
- FREEFORM and NOFREEFORM
- IDENT
- IF and IF DEFINED
- INTEGER
- IVDEP
- MESSAGE
- OBJCOMMENT
- OPTIONS
- PACK
- PSECT
- REAL
- STRICT and NOSTRICT
- TITLE and SUBTITLE
- UNROLL

The following OpenMP Fortran API parallel directives are extensions available on Tru64 UNIX systems (see Section 15.2.3):

- ATOMIC
- BARRIER
- CRITICAL
- DO
- FLUSH
- MASTER
- ORDERED
- PARALLEL
- PARALLEL DO
- PARALLEL SECTIONS
- SECTIONS
- SINGLE
- THREADPRIVATE

The following Compaq Fortran parallel directives are extensions available on Tru64 UNIX systems (see Section 15.2.4):

- BARRIER
- CHUNK
- COPYIN
- CRITICAL SECTION
- INSTANCE
- MP_SCHEDTYPE
- PARALLEL
- PARALLEL DO
- PARALLEL SECTIONS
- PDO
- PDONE
- PSECTIONS
- SINGLE PROCESS
- TASKCOMMON

Intrinsic Procedures

The following intrinsic procedures are extensions available on all platforms (see Chapter 9):

ACOSD | DFLOAT | IISIGN | JMIN0
AIMAX0 | DFLOTI | IMAX0 | JMIN1
AIMIN0 | DFLOTJ | IMAX1 | JMOD
AJMAX0 | DIMAG | IMIN0 | JMVBITS
AJMIN0 | DREAL | IMIN1 | JNINT
AND | DSIND | IMOD | JNOT
ASIND | DTAND | IMVBITS | JZEXT
ASM | EOF | ININT | LEADZ
ATAN2D | ERRSNS | INOT | LOC
ATAND | EXIT | INT1 | LSHIFT
BITEST | FASM | INT2 | MALLOC
BJTEST | FLOATI | INT4 | MULT_HIGH
CDABS | FLOATJ | ISHA | NWORKERS
CDCOS | FP_CLASS | ISHC | OR
CDEXP | FREE | ISHL | POPCNT
CDLOG | HFIX | ISNAN | POPPAR
CDSIN | IARGPTR | IZEXT | RAN
CDSQRT | IBCHNG | JFIX | RANDU
COSD | IDATE | JIAND | RSHIFT
COTAN | IIABS | JIBCLR | SECNDS
COTAND | IIAND | JIBITS | SIND
DACOSD | IIBCLR | JIBSET | SIZEOF
DASIND | IIBITS | JIDIM | TAND
DASM | IIBSET | JIDINT | TIME
DATAN2 | IIDIM | JIDNNT | TRAILZ
DATAN2D | IIDINT | JIEOR | XOR
DATAND | IIDNNT | JINT | ZABS
DATE | IIEOR | JIOR | ZCOS
DCMPLX | IIFIX | JISHFT | ZEXP
DCONJG | IINT | JISHFTC | ZEXT
DCOSD | IIOR | JISIGN | ZLOG
DCOTAN | IISHFT | JMAX0 | ZSIN
DCOTAND | IISHFTC | JMAX1 | ZSQRT

The following intrinsic procedures are extensions available on OpenVMS, Tru64 UNIX, and Linux systems (see Chapter 9):

CQABS | KIQNNT | QCOSH | QMOD
CQCOS | QABS | QCOTAN | QNINT
CQEXP | QACOS | QCOTAND | QREAL
CQLOG | QACOSD | QDIM | QSIGN
CQSIN | QASIN | QEXP | QSIN
CQSQRT | QASIND | QEXT | QSIND
DBLEQ | QATAN | QEXTD | QSINH
IIQINT | QATAN2 | QFLOAT | QSQRT
IIQNNT | QATAN2D | QIMAG | QTAN
IQINT | QATAND | QINT | QTAND
IQNINT | QCMPLX | QLOG | QTANH
JIQINT | QCONJG | QLOG10 | SNGLQ
JIQNNT | QCOS | QMAX1 |
KIQINT | QCOSD | QMIN1 |

The intrinsic procedure IARGCOUNT is an extension available on OpenVMS systems (see Chapter 9).

The argument KIND is an extension available in the following intrinsic procedures (see Chapter 9):

COUNT | LEN_TRIM | SHAPE | ZEXT
INDEX | MAXLOC | SIZE |
LBOUND | MINLOC | UBOUND |
LEN | MAXLOC | VERIFY |

Additional Language Features

The following are language extensions that facilitate compatibility with other versions of Fortran:

- DEFINE FILE statement (see Section B.1)
- ENCODE and DECODE statements (see Section B.2)
- FIND statement (see Section B.3)
- FORTRAN-66 Interpretation of the EXTERNAL Statement (see Section B.4)
- An alternative syntax for the PARAMETER statement (see Section B.5)
- VIRTUAL statement (see Section B.6)
- AND, OR, XOR, IMAG, LSHIFT, RSHIFT intrinsics (see Table 9-3)
- An alternative syntax for octal and hexadecimal constants (see Section B.7)
- An alternative syntax for an I/O record specifier (see Section B.8)
- An alternate syntax for the DELETE statement (see Section B.9)
- An alternative form for namelist external records (see Section B.10)
- The Compaq Fortran POINTER statement (see Section B.11)
- Record structures (see Section B.12)

Run-Time Library Routines

Run-time library module routines are available for Windows systems (see Appendix E). Some of these routines are also available as `3f` library routines on Tru64 UNIX and Linux systems (see Appendix F).

In addition, run-time library routines are available for directed parallel decomposition on Tru64 UNIX systems (see Appendix F).

Previous Page Next Page Table of Contents