Conventions and terminology used in this document
The following sections discuss the conventions used in this
document.
Typographical conventions
The following table explains the typographical conventions used in this
document.
Table 1. Typographical conventions
Typeface |
Indicates |
Example |
bold |
Commands, executable names, and compiler options. |
By
default, if you use the -qsmp compiler option
in conjunction with one of these invocation commands, the option -qdirective=IBM*:SMP$:$OMP:IBMP:IBMT will be on. |
italics |
Parameters or variables whose actual names or values
are to be supplied by the user. Italics are also used to introduce new terms. |
The maximum length of the trigger_constant in
fixed source form is 4 for directives that are continued on one or more lines. |
UPPERCASE bold |
Fortran programming keywords, statements, directives,
and intrinsic procedures. |
The ASSERT directive applies
only to the DO loop immediately following the
directive, and not to any nested DO loops. |
lowercase bold |
Lowercase programming keywords and library functions,
compiler intrinsic procedures, file and directory names, examples of program
code, command strings, or user-defined names. |
If you call omp_destroy_lock with an uninitialized lock variable, the result of the call is undefined. |
How to read syntax diagrams
Throughout this document, diagrams illustrate XL Fortran syntax. This section
will help you to interpret and use those diagrams.
If a variable or user-specified name ends in _list, you can provide
a list of these terms separated by commas.
You must enter punctuation marks, parentheses, arithmetic operators, and
other special characters as part of the syntax.
- Read syntax diagrams from left to right and from top to bottom, following
the path of the line:
- The >>--- symbol indicates the beginning of
a statement.
- The ---> symbol indicates that the statement syntax
continues on the next line.
- The >--- symbol indicates that a statement continues
from the previous line.
- The --->< symbol indicates the end of a statement.
- Program units, procedures, constructs, interface blocks and derived-type
definitions consist of several individual statements. For such items, a box
encloses the syntax representation, and individual syntax diagrams show the
required order for the equivalent Fortran statements.
- IBM XL Fortran extensions to and implementations of language standards are
marked by a number in the syntax diagram with an explanatory note immediately
following the diagram.
- Required items are shown on the horizontal line (the main path):
 >>-keyword--required_argument----------------------------------><
|
- Optional items are shown below the main path:
 >>-keyword--+-------------------+------------------------------><
'-optional_argument-'
|
Note:
Optional items (not in syntax diagrams) are enclosed
by square brackets ([ and ]). For example, [UNIT=]u
- If you can choose from two or more items, they are shown vertically, in
a stack.
If you must choose one of the items, one
item of the stack is shown on the main path:
 >>-keyword--+-required_argument-+------------------------------><
'-required_argument-'
|
If choosing one of the items is optional, the entire stack is
shown below the main path:
 >>-keyword--+-------------------+------------------------------><
+-optional_argument-+
'-optional_argument-'
|
- An arrow returning to the left above the main line (a repeat arrow) indicates
that you can repeat an item, and the separator character if it is other than
a blank:
 .-,-------------------.
V |
>>-keyword----repeatable_argument-+----------------------------><
|
A repeat arrow above a stack indicates that you can make more
than one choice from the items in the stack.
 .-,---------------------.
V |
>>-keyword----+-required_argument-+-+--------------------------><
'-required_argument-'
|
Sample syntax diagram
The following is an example of a syntax diagram with an interpretation:

.-,-.
(1) V |
>>-EXAMPLE-------char_constant--+-a-+--+---+----e-+------------->
'-b-' +-c-+
'-d-'
>--name_list---------------------------------------------------><
Notes:
- IBM Extension
Interpret the diagram as follows:
- Enter the keyword EXAMPLE.
- EXAMPLE is an IBM extension.
- Enter a value for char_constant.
- Enter a value for a or b, but not for both.
- Optionally, enter a value for c or d.
- Enter at least one value for e. If you enter more than one value,
you must put a comma between each.
- Enter the value of at least one name for name_list.
If you enter more than one value, you must put a comma between each. (The _list syntax is equivalent to the previous syntax for e.)
How to read syntax statements
Syntax statements are read from left to right:
- Individual required arguments are shown with no special notation.
- When you must make a choice between a set of alternatives, they are enclosed
by { and } symbols.
- Optional arguments are enclosed by [ and ] symbols.
- When you can select from a group of choices, they are separated by |
characters.
- Arguments that you can repeat are followed by ellipses (...).
Example of a syntax statement
EXAMPLE char_constant {a|b}[c|d]e[,e]... name_list{name_list}...
The following list explains the syntax statement:
- Enter the keyword EXAMPLE.
- Enter a value for char_constant.
- Enter a value for a or b, but not for both.
- Optionally, enter a value for c or d.
- Enter at least one value for e. If you enter more than one value,
you must put a comma between each.
- Optionally, enter the value of at least one name for name_list. If you enter more than one value, you must put a comma between each name.
Note:
The same example is used in both the syntax-statement and
syntax-diagram representations.
Examples
The examples in this document are coded in a simple style that does not
try to conserve storage, check for errors, achieve fast performance, or demonstrate
recommended practice.
The examples in this document use the xlf90, xlf90_r, xlf95,
xlf95_r, xlf, xlf_r, f77, fort77, f90, and f95 compiler invocation commands interchangeably. For
more substantial source files, one of these commands may be more suitable
than the others, as explained in Compiling XL Fortran programs.
Some sample programs from this document and some other programs that illustrate
ideas presented in this document are in the directory /opt/ibmcmp/xlf/10.1/samples.
Notes on path names
The path names shown in this document assume the default installation path
for the XL Fortran compiler. By default, XL Fortran will be installed in the following
directory on the selected disk:
/opt/ibmcmp/xlf/10.1
You can select a different destination (relocation-path) for the
compiler. If you choose a different path, the compiler will be installed in
the following directory:
relocation-path/opt/ibmcmp/xlf/10.1
Notes on the terminology used
Some of the terminology in this document is shortened, as follows:
- The term free source form format will often appear
as free source form.
- The term fixed source form format will often appear
as fixed source form.
- The term XL Fortran will often appear as XLF.