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 and Fortran 95 extensions are marked by a number in the syntax diagram with an explanatory note immediately following the diagram.
- 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 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:
.-,-.
Notes:
|
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 .)