This function returns the extent of an array field or variable as an INTEGER value. More specifically, it returns:
![]()
 The Unknown value (?) for a field or variable defined as an unfixed indeterminate array
 EXTENT ( array )In the following example, the EXTENT function is used to set the limit of a DO loop that cycles through all elements of an array:
 DEFINE VARIABLE int_value AS INTEGER NO-UNDO EXTENT 3 INITIAL [1, 2, 3].DEFINE VARIABLE ix AS INTEGER NO-UNDO .DEFINE VARIABLE tot AS INTEGER NO-UNDO LABEL "The total is".DO ix = 1 TO EXTENT(int_value):tot = tot + int_value[ix].END.DISPLAY tot.
| © 2012 Progress Software Corporation and/or its subsidiaries or affiliates. |