Deletes an element from a dynamic array.
||Any valid dynamic array.
||An integer specifying the Field (attribute) level of the dynamic array on which to perform the deletion. Fields/Attributes are counted from 1.
||Optional An integer specifying the Value level of the dynamic array on which to perform the deletion. Values are counted from 1 within a Field.
||Optional An integer specifying the Subvalue level of the dynamic array on which to perform the deletion. Subvalues are counted from 1 within a Value.
statement deletes one element from a dynamic array. It deletes both the data and the dynamic array delimiter. Which element to delete is specified by the f
, and s
integers. The enclosing angle brackets are mandatory. For example, if f
=2 and v
=3, this means delete the third value from the second field. If f
=2 and v
is not specified, this means to delete the entire second field.
statement and the DELETE
function perform the same operation, with the following difference: DEL
changes the supplied dynamic array; DELETE
creates a new dynamic array with the specified change and leaves the supplied dynamic array unchanged.
The following example uses the DEL
statement to delete the second value from the first field of a dynamic array:
! Returns: "New YorkýLondonýChicagoýBostonýLos Angeles"
DEL cities <1,2>
! Returns: "New YorkýChicagoýBostonýLos Angeles"
© 1997-2019 InterSystems Corporation, Cambridge, MA