Items
An item is a named area of memory that contains a single value. Such an area may be described by any of the following entities:
- A data item
- A structure item, so long as the structure item does not represent an array
- An element of an array, so long as the array element does not represent an array
An item may have subordinate structure items, and any of those subordinates may represent an array.
An item is distinct from any of these entities:
- A system variable
- A literal
- An array
The following two syntax diagrams tell how to refer to an item.
- record name, data item name, form name
- The name of a data item, record, or form.
- structure item name
- The name of a structure item in a record,form, or dataTable.
- subscript
- An integer, or an item (or system variable) that resolves to an integer. The value of a subscript is an index that refers to a specific element in an array.
An item used as a subscript of an array cannot itself be an array element. In each of the following examples, myItemB[1] is both a subscript and an array element; as a result, the following syntax is not valid:
/* the next syntax is not valid */ myItemA[myItemB[1]] // This next syntax is not valid; but the // reason (if you are working in VisualAge Generator // compatibility mode) is that myItemB is myItemB[1], // the first element of a one-dimensional array myItemA[myItemB]For further details on referencing an item, see References to variables and constants. See also Arrays.
Related concepts
Compatibility with VisualAge Generator
DataItem part
Record parts
References to variables and constants
Structure
Related tasks
Syntax diagram
Related reference
Arrays
Data initialization
Items
Logical expressions
Numeric expressions
Operators and precedence
Primitive types
Text expressions