SYS_LAST_ARRAY_INDEX
Use the SYS_LAST_ARRAY_INDEX script function to return the last filled index of an array. Populate the array with the :FILL script statement before you use this function.
Syntax
SYS_LAST_ARRAY_INDEX()
Return Code
The script function returns the last index that was filled in the array.
Example
The following example fills a script variable array with values from a VARA object. The SYS_LAST_ARRAY_INDEX function returns last index to be filled in the array. The script prints the returned index in the activation report.
:DEFINE &ARRAY#, string, 20
:FILL &ARRAY#[] = GET_VAR(VARA.TEST, 'A')
:SET &INDEXES# = SYS_LAST_ARRAY_INDEX()
:PRINT &INDEXES#
See also:
seealso