HP Fortran for OpenVMS
Language Reference Manual


Previous Contents Index


Appendix E
Summary of Language Extensions

This appendix summarizes the HP Fortran language extensions to the ANSI/ISO Fortran 95 Standard.

E.1 HP Fortran Language Extensions

This section summarizes the HP 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:

Names

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

Character Sets

The following are extensions to the Fortran 95 character set:

Intrinsic Data Types

The following are data-type extensions (see Section 3.2):
BYTE INTEGER*1 REAL*8
LOGICAL*1 INTEGER*2 REAL*16
LOGICAL*2 INTEGER*4 COMPLEX*8
LOGICAL*4 INTEGER*8 COMPLEX*16
LOGICAL*8 REAL*4 COMPLEX*32

Constants

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

Hollerith constants are allowed as an extension (see Section 3.4.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.4).

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

Specification Statements

The following specification attributes and statements are extensions:

Execution Control

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

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

Built-In Functions

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

I/O Formatting

The following are extensions allowed in I/O formatting:

Compilation Control Statements

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

I/O Statements

The following I/O statements and specifiers are extensions:

File Operation Statements

The following statement specifiers and statements are extensions (see Chapter 12 for details):

Compiler Directives

The following general directives are extensions (see Chapter 14):
ALIAS INTEGER PSECT
ATTRIBUTES IVDEP REAL
DECLARE MESSAGE SUBTITLE
DEFINE NODECLARE STRICT
FIXEDFORMLINESIZE NOFREEFORM TITLE
FREEFORM NOSTRICT UNDEFINE
IDENT OBJCOMMENT UNROLL
IF OPTIONS  
IF DEFINED PACK  

Intrinsic Procedures

The following intrinsic procedures are extensions (see Chapter 9):
ACOSD AIMAX0 AIMIN0 AJMAX0
AJMIN0 AND ASIND ASM
ATAN2D ATAND BITEST BJTEST
CDABS CDCOS CDEXP CDLOG
CDSIN CDSQRT COSD COTAN
COTAND CQABS CQCOS CQEXP
CQLOG CQSIN CQSQRT DACOSD
DASIND DASM DATAN2 DATAN2D
DATAND DATE DBLEQ DCMPLX
DCONJG DCOSD DCOTAN DCOTAND
DFLOAT DFLOTI DFLOTJ DIMAG
DREAL DSIND DTAND EOF
ERRSNS EXIT FASM FLOATI
FLOATJ FP_CLASS FREE HFIX
IARGCOUNT IARGPTR IBCHNG IDATE
IIABS IIAND IIBCLR IIBITS
IIBSET IIDIM IIDINT IIDNNT
IIEOR IIFIX IINT IIOR
IIQINT IIQNNT IISHFT IISHFTC
IISIGN IMAX0 IMAX1 IMIN0
IMIN1 IMOD IMVBITS ININT
INOT INT1 INT2 INT4
IQINT IQNINT ISHA ISHC
ISHL ISNAN IZEXT JFIX
JIAND JIBCLR JIBITS JIBSET
JIDIM JIDINT JIDNNT JIEOR
JINT JIOR JIQINT JIQNNT
JISHFT JISHFTC JISIGN JMAX0
JMAX1 JMIN0 JMIN1 JMOD
JMVBITS JNINT JNOT JZEXT
KIQINT KIQNNT LEADZ LOC
LSHIFT MALLOC MULT_HIGH NWORKERS
OR POPCNT POPPAR QABS
QACOS QACOSD QASIN QASIND
QATAN QATAND QATAN2 QATAN2D
QCMPLX QCONJG QCOS QCOSD
QCOSH QCOTAN QCOTAND QDIM
QEXP QEXT QEXTD QFLOAT
QIMAG QINT QLOG QLOG10
QMAX1 QMIN1 QMOD QNINT
QREAL QSIGN QSIN QSIND
QSINH QSQRT QTAN QTAND
QTANH RAN RANDU RSHIFT
SECNDS SIND SIZEOF SNGLQ
TAND TIME TRAILZ XOR
ZABS ZCOS ZEXP ZEXT
ZLOG ZSIN ZSQRT  

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 SCAN VERIFY  

See Appendix B for additional language extensions that facilitate compatibility with other versions of Fortran.


Glossary

This glossary contains terms that are commonly used in this manual and in the HP Fortran for OpenVMS User Manual. The terms and descriptions are informative and are not part of the standard definition of the Fortran 95/90 programming language.

actual argument: A value (a variable, expression, or procedure) passed from a calling program unit to a subprogram.

adjustable array: An explicit-shape array that is a dummy argument to a subprogram. The term is from FORTRAN 77. See also explicit-shape array.

aggregate reference: A reference to a record structure field.

allocatable array: A named array that has the ALLOCATABLE attribute. Once space has been allocated for this type of array, the array has a shape and can be defined (and redefined) or referenced. (It is an error to allocate an allocatable array that is currently allocated.)

alphanumeric: Pertaining to letters and digits.

alternate key: An optional key within the data records in an indexed file, which can be used to build an alternate index.

alternate return: A subroutine argument that permits control to branch immediately to some position other than the statement following the call. The actual argument in an alternate return is the statement label to which control should be transferred.

ANSI: The American National Standards Institute. An organization through which accredited organizations create and maintain voluntary industry standards.

argument: See actual argument and dummy argument.

argument association: The relationship (or "matching up") between an actual argument and dummy argument during the execution of a procedure reference.

argument keyword: The name of a dummy (formal) argument. The name is used in a subprogram (routine) definition. It can also be used when the subprogram is invoked to associate dummy arguments with actual arguments, so that they can appear in any order.

Argument keywords are supplied for many of the intrinsic procedures.

array: A set of scalar data that all have the same type and kind parameters. An array can be referenced by element (using a subscript), by section (using a section subscript list), or as a whole. An array has a rank (up to 7), bounds, size, and a shape. Contrast with scalar. See also bounds, conformable, shape, and size.

array constructor: A mechanism used to specify a sequence of scalar values that produce a rank-one array.

To construct an array of rank greater than one, you must apply the RESHAPE intrinsic function to the array constructor.

array element: A scalar item in an array. An array element is identified by the array name followed by one or more subscripts in parentheses, indicating the element's position in the array. For example, B(3) or A(2,5) .

array pointer: A pointer to an array. See also array and pointer.

array section: A subobject (or portion) of an array. It consists of the set of array elements or substrings of this set. The set (or section subscript list) is specified by subscripts, subscript triplets, and vector subscripts. If the set does not contain at least one subscript triplet or vector subscript, the reference indicates an array element, not an array.

array specification: A program statement specifying an array name and the number of dimensions the array contains (its rank). An array specification can appear in a DIMENSION or COMMON statement, or in a type declaration statement.

ASCII: The American Standard Code for Information Interchange. A 7-bit character encoding scheme associating an integer from 0 through 127 with 128 characters. See also multinational character set.

assignment statement: Usually, a statement that assigns (stores) the value of an expression on the right of an equal sign to the storage location of the variable to the left of the equal sign. In the case of Fortran 95/90 pointers, the storage location is assigned, not the pointer itself.

association: The relationship that allows an entity to be referenced by different names in one scoping unit or by the same or different names in more than one scoping unit. The principal kinds of association are argument association, host association, pointer association, storage association, and use association. See also argument association, host association, pointer association, storage association, and use association.

assumed-length character argument: A dummy argument that assumes the length attribute of the corresponding actual argument. An asterisk (*) specifies the length of the dummy character argument.

assumed-shape array: A dummy argument array that assumes the shape of its associated actual argument array.

assumed-size array: A dummy array whose size (only) is assumed from its associated actual argument. The upper bound of its last dimension is specified by an asterisk (*). All other extents (if any) must be specified.

attribute: A property of a data object that can be specified in a type declaration statement. These properties determine how the data object can be used in a program.

Most attributes can be alternatively specified in statements. For example, the DIMENSION statement has the same meaning as the DIMENSION attribute appearing in a type declaration statement.

automatic array: Is an explicit-shape array that is a local variable in a subprogram. It is not a dummy argument, and has bounds that are nonconstant specification expressions. The bounds (and shape) are determined at entry to the procedure by evaluating the bounds expressions. See also automatic object.

automatic object: A local data object that is created upon entry to a subprogram and disappears when the execution of the subprogram is completed. There are two kinds of automatic objects: arrays (of any data type) and objects of type CHARACTER. Automatic objects cannot be saved or initialized.

An automatic object is not a dummy argument, but is declared with a specification expression that is not a constant expression. The specification expression can be the bounds of the array or the length of the character object.

batch process: A process that runs without user interaction. Contrast with interactive process.

big endian: A method of data storage in which the least significant bit of a numeric value spanning multiple bytes is in the highest addressed byte. Contrast with little endian.

binary constant: A constant that is a string of binary (base 2) digits (0 or 1) enclosed by apostrophes or quotation marks and preceded by the letter B.

binary operator: An operator that acts on a pair of operands. The exponentiation, multiplication, division, and concatenation operators are binary operators.

bit constant: A constant that is a binary, octal, or hexadecimal number.

bit field: A contiguous group of bits within a binary pattern; they are specified by a starting bit position and length. The functions IBSET, IBCLR, BTEST, and IBITS, and the subroutine MVBITS operate on bit fields.

blank common: A common block (one or more contiguous areas of storage) without a name. Common blocks are defined by a COMMON statement.

block: In general, a group of related items treated as a physical unit. For example, a block can be a group of constructs or statements that perform a task; the task can be executed once, repeatedly, or not at all.

block data program unit: A program unit, containing a BLOCK DATA statement and its associated specification statements, that establishes common blocks and assigns initial values to the variables in named common blocks. In FORTRAN 77, this was called a block data subprogram.

bottleneck: The slowest process in an executing program. This process determines the maximum speed of execution.

bounds: The range of subscript values for elements of an array. The lower bound is the smallest subscript value in a dimension, and the upper bound is the largest subscript value in that dimension. Array bounds can be positive, zero, or negative.

These bounds are specified in an array specification. See also array specification.

breakpoint: A critical point in a program, at which execution is stopped so that you can see if the program variables contain the correct values. Breakpoints are often used to debug programs.

built-in procedure: See intrinsic procedure.

carriage-control character: A character in the first position of a printed record that determines the vertical spacing of the output line.

character constant: A constant that is a string of printable ASCII characters enclosed by apostrophes (') or quotation marks (").

character expression: A character constant, variable, function value, or another constant expression, separated by a concatenation operator (//); for example, DAY//' FIRST' .

character storage unit: The unit of storage for holding a scalar value of default character type (and character length one) that is not a pointer. One character storage unit corresponds to one byte of memory.

character string: A sequence of contiguous characters; a character data value. See also character constant.

character substring: One or more contiguous characters in a character string.


Previous Next Contents Index