Extracts sequential elements of a dynamic array in reverse order.
REVREMOVE value FROM dynarray SETTING delim
||A variable used to receive the extracted element value.
||A dynamic array from which successive data values are to be extracted.
||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]).
efficiently extracts successive data values from a dynamic array beginning at the end of the string. 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 successively previous element values. When the last element value has been extracted, REMOVE
to the empty string.
statement is identical to the REMOVE
statement, except that it 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 last 5 Value Mark elements from a dynamic array:
FOR x=1 TO 5
REVREMOVE val FROM names SETTING 3
© 1997-2019 InterSystems Corporation, Cambridge, MA