DELETE

DELETE


DEL Index Level DELETE
Syntax DELETE( dynamic.array.expression, ac.expression )
DELETE( dynamic.array.expression, ac.expression, vc.expression )
DELETE( dynamic.array.expression, ac.expression, vc.expression, sc.expression )
Category BASIC
Type Function
Description function removes a specific attribute, value, or subvalue from a dimensioned or dynamic array.

The "delete" function returns a copy of the dynamic array without the deleted element. It does not change the original string unless specifically designated in an assignment statement.
Options
See Also READ WRITE LOCATE statements & functions DEL REPLACE MATREAD INSERT vc.expression functions sc.expression DELETE
Example equ vm to char(253)
names = "john":vm:"paul":vm:"george":vm:"ringo"
names = delete(beatles,1,3)

This example deletes the value "george" from the dynamic array "names".  The reference to attribute 1 is required.  The absence of attribute marks in "beatles" requires it be treated as a single attribute.

read cust.item from cust.file,item.id else cust.item = ""
locate(date(),cust.item,date.flds;vx) then
write delete(cust.item,date.flds,vx) on cust.file,item.id
end
Warnings Attempting to delete attribute 0 is undefined and should be avoided.
In R83, the delete function does not work on dimensioned arrays.
Compatibility
DEL Index Level DELETE