Extracts sequential elements of a dynamic array.
REMOVE value FROM dynarray [AT pos] SETTING delim
||A variable used to receive the extracted element value.
||A dynamic array from which successive data values are to be extracted.
||Optional A variable specifying the initial starting position in dynarray as an integer character count. pos must be specified as a local variable, not as a numeric literal. The AT clause is provided for compatibility with D3 and UniData systems.
||A local variable that resolves to an integer code for the dynamic array delimiter type. delim must be specified as a local variable, not as a numeric literal. delim can accept a single dynamic array reference (A<i>), a single substring reference (A[s,l]), or a substring reference nested inside a dynamic array reference (A<i>[s,l]).
statement efficiently extracts successive data values from a dynamic array. The extracted element value is placed in the value
operates on a single dynamic array level; you specify the level delimiter using the delim
maintains an internal pointer so that repeated calls return successive element values. When the last element value has been extracted, REMOVE
to the empty string.
statement is identical to the REVREMOVE
statement, except that REVREMOVE
operates in the reverse direction. The REMOVE
statement, and REVREMOVE
statement all share the same pointer. It is incremented by a Remove and decremented by a Revremove.
variable resolves to an integer code with one of the following values:
||End of file
||@IM Item Mark CHAR(255)
||@FM Field Mark CHAR(254)
||@VM Value Mark CHAR(253)
||@SM Subvalue Mark CHAR(252)
||@TM Text Mark CHAR(251)
The following example successively extracts the first 5 Value Mark elements from a dynamic array:
FOR x=1 TO 5
REMOVE val FROM names SETTING delim
© 1997-2019 InterSystems Corporation, Cambridge, MA