Expression is a sequence of characters, which form a correct mathematic expression. If it is required, that an expression should get a value of particular type, then this value type will be identified as follows:
Identifier of value (see also Identifiers) is:
In case that the name of an object identifies an object of Structured variable, then an access to item (optionally an index) must follow the name. For example:
SV.Structure^Int
SV.Structure[2]^Int
Similarly, if a local variable is of RECORD type, or type ALIAS, an access to item (optionally an index) must necessarily follow the name. For example:
RECORD (SD.RecordDef) _locRecord
ALIAS (SD.RecordDef) _aliasRecord
INT _index
_locRecord[_index]^Int
_aliasRecord^Int
As we can see from the examples, index (row number) is enclosed in square brackets []. Index, in declaration, is evaluated as an expression, which has to get a value of Int type.
According to the identifier definition, the following types belong
into this category::
IC_C, IC_O, IC_O_R_RIA, IC_O_R_RIN, IC_L, IC_L_CONST, IC_L_AN, IC_L_AT_RIA, IC_L_AT_RIN, IC_L_RNA_RIA,
IC_L_RNA_RIN, IC_L_R_RIA, IC_L_R_RIN.
Identifier of a structure row is:
An example for objects:
INT _index
SV.Structure[_index+1]
SV.Structure[1]
An example for local variable:
RECORD (SD.RecordDef) _locRecord
ALIAS (SD.RecordDef) _aliasRecord
INT _index
_locRecord[3]
_locRecord[_index]
_aliasRecord[_index]
_aliasRecord[6]
According to the identifier's definition, the following types
belong to this category:
IC_O_R_R, IC_L_AT_R, IC_L_RNA_R, IC_L_R_R, and the index placed after identifier must be <> 0.
Row is identified by its name. Therefore structure row identifier can be defined in two ways:
Structure row index is not important.
Row is identified by its name. Therefore structure row identifier can be defined in two ways:
Identifier of entire structure is:
An example for objects:
INT _index
SV.Structure
An example for local variable:
RECORD (SD.RecordDef) _locRecord
ALIAS (SD.RecordDef) _aliasRecord
INT _index
_locRecord
_aliasRecord
According to the identifier's definition, the following types
belong to this category:
IC_O_R, IC_O_R_R*, IC_L_AT_R*, IC_L_RNA, IC_L_RNA_R*, IC_L_R, IC_L_R_R*
* index behind an identifier must be = 0.
Reference to object is an special case of value identifier, where its value must the reference to an object or the identifier is directly the object itself.
For example:
; object itself is a reference
Sec
SysTime
U.Int
; Structure item
SV.Struktura[_index]^Object
RECORD (SD.RecordDef) _rec
_rec[_index]^Object
; Alias is the reference to object
ALIAS _a
_a
According to the identifier's definition, the following types
belong to this category:
IC_O, IC_O_R, IC_O_R_RIA, IC_L_AN, IC_L_AT, IC_L_AT_RIA, IC_L_R_RIA.