This section summarizes the DIGITAL Fortran language extensions. Most extensions are available on DIGITAL UNIX, Windows NT, Windows 95, and OpenVMS systems. However, some extensions are limited to one or more systems. If an extension is limited, it is labeled.
The following are extensions to the methods and rules for source forms:
As an extension, the dollar sign ($) is allowed as a valid character in names, including the first character (see Section 2.1.2).
The following are extensions to the Fortran 90 character set:
The following are data-type extensions (see Section 3.1):
| BYTE | INTEGER*1 | REAL*8 [2] |
| LOGICAL*1 | INTEGER*2 | REAL*16 [3] |
| LOGICAL*2 | INTEGER*4 | COMPLEX*8 |
| LOGICAL*4 | INTEGER*8 [1] | COMPLEX*16 [2] |
| LOGICAL*8 [1] | REAL*4 | |
|
[1] Alpha only
| ||
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).
As an extension, default initial values for derived-type components can be specified in derived-type definitions (see Section 3.2.2).
As an extension, arrays declared using the ALLOCATABLE attribute can be automatically deallocated (see Section 6.1.1).
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):
As an extension, the WHERE construct can include nested WHERE constructs and a masked ELSEWHERE statement. WHERE constructs can also be named (see Section 4.2.4).
The following specification attributes and statements are extensions:
The ELEMENTAL prefix is allowed in functions and subroutines as an extension (see Sections 8.4.2 and 8.4.3).
[See Note 1]
As an extension, the END INTERFACE statement of an interface
block defining a generic routine can specify a generic identifier
(see Section 8.8.2).
Compilation Control Statements
The following statements are extensions that can influence
compilation (see Section 14.1):
The %VAL, %REF, %DESCR (VMS only), and %LOC built-
in functions are extensions (see Section 8.7.9).
The following I/O statements and specifiers are extensions:
As an extension, comments (beginning with !) are allowed in namelist
input data.
The following are extensions allowed in I/O formatting:
The following statement specifiers and statements are extensions
(see Chapter 13 for DIGITAL UNIX,
Windows NT, and Windows 95 details; Chapter 12 for OpenVMS details):
The following general directives are extensions (see Section 14.2.1):
The following intrinsic procedures are extensions (see Chapter 9):
INCLUDE '[text-lib] (module-name) [/[NO]LIST]'
/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
| ACOSD | COTAN | IARGCOUNT [2] | NWORKERS |
| ASIND | CPU_TIME | IARGPTR | QEXT [3] |
| ATAND | DATE | IBCHNG | QFLOAT [3] |
| ATAN2D | DCMPLX | IDATE | RAN |
| CDABS [1] | DFLOAT | ISHA | RANDU |
| CDCOS [1] | DREAL | ISHC | SECNDS |
| CDEXP [1] | EOF | ISHL | SIND |
| CDLOG [1] | ERRSNS | ISNAN | SIZEOF |
| CDSIN [1] | EXIT | LOC | TAND |
| CDSQRT [1] | FP_CLASS | MALLOC | TIME |
| COSD | FREE | NULL | ZEXT |
|
[1] Double precision complex intrinsics can also begin with
the letter Z (see Chapter 9). For
example, CDABS can also be spelled ZABS.
| |||
The following INTEGER(8) specific functions are extensions available on Alpha processors (see Chapter 9):
| AKMAX0 | KIBCLR | KIFIX | KMIN0 |
| AKMIN0 | KIBITS | KINT | KMIN1 |
| BKTEST | KIBSET | KIOR | KMOD |
| DFLOTK | KIDIM | KISHFT | KNINT |
| FLOATK | KIDINT | KISIGN | KNOT |
| KIABS | KIDNNT | KMAX0 | KZEXT |
| KIAND | KIEOR | KMAX1 |
As an extension, the keyword KIND can be specified for CEILING
and FLOOR (see Sections 9.3.22 and
9.3.50, respectively).
As an extension, SIGN can distinguish between positive and negative
zero (see Section 9.3.132).
The following are language extensions that facilitate compatibility
with other versions of Fortran:
Run-Time Library Module Routines
Run-time library module routines are available for Windows NT and
Windows 95 systems (see Appendix E). Some
of these routines are also available as
3f library
routines on DIGITAL UNIX systems.
Note 1: The PURE prefix is also allowed as an HPF language extension.