XL Fortran for AIX 8.1
Language Reference
Throughout this book, the syntax of Fortran statements and elements is
illustrated by diagrams, using notation often called "railroad
tracks".
If a variable or user-specified name ends in _list, it means that
you can provide a list of these terms separated by commas.
Punctuation marks, parentheses, arithmetic operators, and other special
characters must be entered as part of the syntax.
- Syntax diagrams are read 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 is
continued on the next line.
- The >--- symbol indicates that a statement is continued
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.
- Required items appear on the horizontal line (the main path):
>>-keyword--required_argument----------------------------------><
- Optional items appear 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 appear vertically, in a
stack.
If you must choose one of the items, one item of the stack
appears on the main path:
>>-keyword--+-required_argument-+------------------------------><
'-required_argument-'
If choosing one of the items is optional, the entire stack appears below
the main path:
>>-keyword--+-------------------+------------------------------><
+-optional_argument-+
'-optional_argument-'
- An arrow returning to the left above the main line (a repeat arrow)
indicates an item that can be repeated, 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 stacked items.
.-,---------------------.
V |
>>-keyword----+-required_argument-+-+--------------------------><
'-required_argument-'
.-,-.
V |
>>-EXAMPLE--char_constant--+-a-+--+---+----e-+--name_list------><
'-b-' +-c-+
'-d-'
|
Interpret the diagram as follows:
- 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.
- 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.)
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]