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_F_ELT ListName

READ_F_ELT IndexName


Description

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

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


When this instruction applies to an index, it reads the first item in index IndexName that is greater than or equal to the index access criteria and assigns the values of the corresponding item 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 item is read, it becomes the current item of the index and associated list. This use is not compatible with ADELIA type programs.


The predefined function &CODE_LST (on the list in the case of a list or on the index in the case of an index) indicates whether the read operation was successful.


Below are the possible values:


Value


*NOT_FOUND

The read did not find the item.

*NORMAL

The read was successful.


Example

* Reads first element in the memory list CUSTOMER_LST

READ_F_ELT CUSTOMER_LST


* Reads first element in the graphical list INVOICE_LST (VADELIA and WADELIA programs)

READ_F_ELT INVOICE_LST:LIST


* 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 as this is the first item greater than or equal to 4

Field1 = 11

READ_F_ELT MyIndex

*The read is not successful (&CODE_LST will return *NOT_FOUND)



↑ Top of page

  • Aucune étiquette