VADELIA |
SADELIA |
WADELIA |
EADELIA |
(I/B) (C/S) |
(B) (S) |
(I) (C/S) |
(B) (C/S) |
Section for use
All
Syntax
READ_ELT IndexName
Description
This instruction reads the first element in the index IndexName that strictly matches the index access criteria and assigns the values of the corresponding element in the list associated with the index to its component variables. The access field values must therefore be defined before using this instruction. If an element is read, it becomes the current element of the index and associated list.
The predefined &CODE_LST index function indicates whether the read operation was successful.
The table below shows the various possible values:
Value |
|
*NOT_FOUND |
The read did not find the element. |
*NORMAL |
The read operation was successful. |
Example
LIST MyList Field1 Field2
LIST_INDEX MyIndex MyList Field1
/* The list contains 4 elements: 10, 2, 5, 7
Field1 = 4
READ_ELT MyIndex
* Will not return any elements as none is strictly equal to 4.
Field1 = 5
READ_ELT MyIndex
* Will read the element of the list with Field1 equal to 5