This document covers the following topics:
The following symbols are used within the diagrams that describe the syntax of Natural statements:
Syntax Symbol | Description |
---|---|
ABCDEF |
Upper-case non-italic letters indicate that the term is either a Natural keyword or a Natural reserved word that must be entered exactly as specified. |
ABCDEF
|
If an optional term in upper-case letters is completely underlined (not a hyperlink!), this indicates that the term is the default value. If you omit the term, the underlined value applies. |
ABCDEF |
If a term in upper-case letters is partially underlined (not a hyperlink!), this indicates that the underlined portion is an acceptable abbreviation of the term. |
abcdef |
Letters in italics are used to represent variable information.
You must supply a valid value when specifying this term.
Note: |
[ ] |
Elements contained within square brackets are optional.
If the square brackets contain several lines stacked one above the other, each line is an optional alternative. You may choose at most one of the alternatives. |
{ } |
If the braces contain several lines stacked one above the other, each line is an alternative. You must choose exactly one of the alternatives. |
| |
The vertical bar separates alternatives. |
... |
A term preceding an ellipsis may optionally be repeated. A
number after the ellipsis indicates how many times the term may be repeated.
If the term preceding the ellipsis is an expression enclosed in square brackets or braces, the ellipsis applies to the entire bracketed expression. |
,... |
A term preceding a comma-ellipsis may optionally be repeated; if
it is repeated, the repetitions must be separated by commas. A number after the
comma-ellipsis indicates how many times the term may be repeated.
If the term preceding the comma-ellipsis is an expression enclosed in square brackets or braces, the comma-ellipsis applies to the entire bracketed expression. |
:... |
A term preceding a colon-ellipsis may optionally be repeated; if
it is repeated, the repetitions must be separated by colons. A number after the
colon-ellipsis indicates how many times the term may be repeated.
If the term preceding the colon-ellipsis is an expression enclosed in square brackets or braces, the colon-ellipsis applies to the entire bracketed expression. |
Other symbols
(except |
All other symbols except those defined in this table must be
entered exactly as specified.
Exception: The SQL scalar concatenation operator is represented by two vertical bars that must be entered literally as they appear in the syntax definition. |
WRITE [USING ]
|
|
operand1 [operand2 ] |
WRITE
, USING
, MAP
and FORM
are Natural keywords which you must enter as
specified.
operand1 and operand2 are user-supplied variables for which you specify the names of the objects you wish to deal with.
The braces indicate that you must choose whether to specify either
FORM
or MAP
; however, you must specify one of the
two.
The square brackets indicate that USING
and
operand2 are optional elements which you can, but
need not, specify.
The ellipsis indicates that you may specify operand2 several times.
Whenever one or more operands appear in the syntax of a Natural statement, the following table is provided:
Operand | Possible Structure | Possible Formats | Referencing Permitted | Dynamic Definition | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operand1 | C | S | A | G | N/M | E | A | U | N | P | I | F | B | D | T | L | C | O | yes/no | yes/no |
This table provides the following information on each operand:
Indicates the structure which the operand may take:
C | Constant. | |
---|---|---|
S | Single occurrence (scalar; that is, a field/variable which is neither an array nor a group). | |
A | Array. | |
G | Group. | |
N/M | Natural system variable: | |
N | All system variables can be used. | |
M | Only modifiable system variables can be used. For information on wether the content of a system variable is modifiable or not, see the Natural System Variables documentation. | |
E | Arithmetic expressions. |
Indicates the format which the operand may take:
A | Alphanumeric (ASCII code page) |
---|---|
U | Alphanumeric (Unicode) |
N | Numeric unpacked |
P | Packed numeric |
I | Integer |
F | Floating point |
B | Binary |
D | Date |
T | Time |
L | Logical |
C | Attribute control |
O | HANDLE OF
OBJECT |
Indicates whether the operand may be referenced or not, using a statement label or the source code line number.
Indicates whether the field may be dynamically defined within the body of the program. This is possible in reporting mode only.