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:

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:

The following two syntax diagrams tell how to refer to an item.


Syntax diagram for an item


Syntax diagram for use of this

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