Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(B) (C/S)


Warning: In the case of ADELIA programs, this instruction is not compatible with C generator, and cannot be used on an index.


Section for use

All


Syntax

READ_NX_ELT ListName

READ_NX_ELT IndexName


Description

When this instruction applies to an index, it reads the following element in the list ListName and assigns the values to its variables.

After running this instruction, the current item is the read item.


Below are the possible values:


Value


*NOT_FOUND

The read did not find the item (empty list).

*NORMAL

The read was successful.

*INVALID_OP

The index is not yet created or has been destroyed.


Example

* Reads the first element of the list AGREEMENT_LST,

* and then, next elements up to the end.

READ_F_ELT AGREEMENT_LST

DO_WHILE &CODE_LST(AGREEMENT_LST) = *NORMAL

...

READ_NX_ELT AGREEMENT_LST

REDO


* Read index

LIST MyList Field1 Field2

LIST_INDEX MyIndex MyList Field1

*/ The list contains 4 items with the following values for Field1: 10, 2, 5 and 7

Field1 = 4


READ_F_ELT MyIndex

* Reads the list item with Field1 equal to 5

READ_NX_ELT MyIndex

*Reads the list item with Field1 equal to 7


↑ Top of page

  • Aucune étiquette