HP Fortran Programmer's Reference (September 2007)

Introduction to HP Fortran
HP Fortran features
Chapter 1 35
HP Fortran features
The following summarizes features of HP Fortran that are not in standard FORTRAN 77 and
indicates where they are described in this manual.
Source format
The fixed source form of FORTRAN 77 is extended by the addition of the semicolon (;)
statement separator and the exclamation point (!) trailing comment.
HP Fortran also supports free format source code. The format used in a source program file is
normally indicated by the file suffix, but the default format can be overridden by the +source
compile-line option.
For information about source format, see “Source format of program file” on page 48.
Data types
Data declarations can include a kind type parameter—an integer value that determines
the range and precision of values for the declared data object. The kind type parameter
value is the number of bytes representing an entity of that type, except for COMPLEX
entities, where the number of bytes required is double the kind type value.
In principle, multibyte character data for languages with large character sets can be
implemented in Fortran by means of a kind type parameter for the CHARACTER data type.
HP Fortran, however, uses the Extended Unix Code (EUC) characters in file names,
comments, and string literals.
Fortran supports derived types, which are composed of entities of the intrinsic types
(INTEGER, REAL, COMPLEX, LOGICAL, and CHARACTER) or entities of previously defined
derived types. You declare derived-type objects in the same way that you declare
intrinsic-type objects.
For information about intrinsic and derived types, see “Intrinsic data types” on page 107 and
“Derived types” on page 123.
Pointers
Pointers are variables that contain addresses of other variables of the same type. Pointers are
declared in Fortran 90 with the POINTER attribute. A pointer is an alias, and the variable (or
allocated space) for which it is an alias is its target. The pointer enables data to be accessed
and handled dynamically. For more information, see “Pointers” on page 131.