Extract function
Description
Extracts a field, value, or subvalue from a dynamic array.
Syntax
result = Extract(array, field, value, subvalue)
Parameters
The Extract statement has the following parameters
Parameter | Description |
---|---|
array | Specifies the dynamic array that is to be accessed. |
field | The field number of the field in array to extract. Values for value and subvalue must be 0 (zero) to extract the field. |
value | The ordinal number of the value to be extracted. The value for subvalue must be 0 (zero) to extract value. field must be greater than 0 (zero). |
subvalue | The ordinal number of the subvalue to be extracted. The values of field and value must be greater than 0 (zero). |
Compiled code will run more efficiently when field is an integer constant, and value and subvalue are equal to zero. The Extract function is identical to the angle brackets (< >).|
See Also
Example
/* If subvalue 1, of value 2, of field 3, of dynamic array Y is greater than 6, the program will go to next_step. */ If Extract(Y, 3, 2, 1) GT 6 Then GoSub next_step End * Extracts columns 1 to 31 from CASH. For counter = 1 To 31 T = Extract(CASH, counter, 0, 0) Next counter ** **