basic.delete.function Function/BASIC Program

basic.delete.function

Command basic.delete.function Function/BASIC Program
Applicable release versions:
Category BASIC Program (486)
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.
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)
Options
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
Purpose
Related basic.read
basic.write
basic.locate
basic.statements
basic.del
basic.replace
basic.matread
basic.insert
basic.vc.expression
basic.functions
basic.sc.expression
basic.delete.statement