REMOVE will successively extract delimited strings from a dynamic array.
REMOVE variable FROM array SETTING setvar
variable is the variable which is to receive the extracted string.
array is the dynamic array from which the string is to be extracted.
setvar is set by the system during the extraction to indicate the type of delimiter found:
The first time the REMOVE statement is used with a particular array, it will extract
the first delimited string it and set the special "remove pointer" to the start
of the next string (if any). The next time REMOVE
The variable named in the SETTING clause is used to record the type of delimiter that was found - so that you can tell whether the REMOVE statement extracted a field, a value or a subvalue for example. Delimiters are defined as characters between xF9 and xFF only.
Once the end of the array has been reached, the string variable will not be updated and the SETTING clause will always return 0. You can reset the "remove pointer" by assigning the variable to itself - for example REC = REC.
The first time REMOVE is used, EXSTRING will contain "Field 1" and DELIM will contain xFE. The second time REMOVE is used, EXSTRING will contain "Value 1" and DELIM will contain xFD.