Was this helpful?
ArrayFirstRow()
Returns the number of the first deleted record in an array.
Syntax
returnfield = [callproc] arrayfirstrow(arr)
returnfield
Specifies the name of field to which the result is returned. Integer.
arr
Specifies the name of an array
Description
The arrayfirstrow() built-in function returns the number of the first deleted record in an array.
When records are deleted, 4GL moves the deleted records to the beginning of the array and assigns 0 or negative sequence numbers to them (0, -1, etc.). This statement returns the number of the "first" deleted record (the one with the largest negative number). If there are no deleted records or if there are no records in the array (deleted or not), arrayfirstrow() returns a value of 1.
Example
To find the number of the first deleted row in the array emparray:
x = callproc arrayfirstrow (emparray);
Last modified date: 04/03/2024