DEL, DELETE() |
|
|
The DEL statement and DELETE() function delete a field, value or subvalue from a dynamic array. Used with a data collection, the DEL statement deletes an element.
Format
DEL dyn.array<field {, value {, subvalue}}> DELETE(dyn.array, field {, value {, subvalue}}) DEL collection{path}
where
Dynamic Arrays
The specified field, value or subvalue is deleted from the dynamic array. The DEL statement assigns the result to the dyn.array variable. The DELETE() function returns the result without modifying dyn.array.
Data Collections
The collection element identified by the element path is deleted. If this is an array element, subsequent elements move back, reducing the array size. Note that when used in this way, the curly brackets surrounding the path are part of the syntax, not markers for optional items.
Examples
DEL ITEMS<1,N>
This statement deletes field 1, value N from dynamic array ITEMS.
S = DELETE(ITEMS, 1, N)
This statement is similar to the previous example except that the result is assigned to S, leaving ITEMS unchanged.
DEL CLIENT.DATA{'CONTACT.NAME', N}
See also: Data collections, EXTRACT(), FIND, FINDSTR, INS, INSERT(), LISTINDEX(), LOCATE, LOCATE(), REPLACE() |