EXTRACT()

EXTRACT()

Top  Previous  Next

 

The EXTRACT() function extracts a field, value or subvalue from a dynamic array.

 

 

Format

 

EXTRACT(dyn.array, field {, value {, subvalue}})

 

where

 

dyn.arrayis the dynamic array from which the item is to be extracted.

 

fieldevaluates to the number of the field to be extracted.

 

valueevaluates to the number of the value to be extracted. If omitted or zero, the entire field is extracted.

 

subvalueevaluates to the number of the subvalue to be extracted. If omitted or zero, the entire value is extracted.

 

 

The specified field, value or subvalue is extracted from the dynamic array and returned as the result of the EXTRACT() function. This function is identical in effect to the alternative syntax of

dyn.array<field {, value {, subvalue}}>

 

 

Example

 

AMOUNT.DUE = EXTRACT(INVOICE.REC, 3)

 

This statement extracts field 3 from INVOICE.REC, assigning the result to variable AMOUNT.DUE.

 

 

See also:

DEL, DELETE(), FIND, FINDSTR, INS, INSERT(), LISTINDEX(), LOCATE, LOCATE(), REPLACE()