DEL


The DEL statement is used to remove a specified element of a dynamic array.

 

COMMAND SYNTAX

DEL variable<expression1{, expression2{, expression3}}>

 

SYNTAX ELEMENTS

The variable can be any previously assigned variable or matrix element. The expressions must evaluate to a numeric value or a runtime error will occur. expression1 specifies the field in the array to operate upon and must be present. expression2 specifies the multivalue within the field to operate upon and is an optional parameter. expression3 is optionally present when expression2 has been included. It specifies which subvalue to delete within the specified multivalue.

 

NOTES

Non integer values for any of the expressions are truncated to integers.

Invalid numeric values for the expressions are ignored without warning.

The command operates within the scope specified, i.e. if only a field is specified then the entire field (including its multivalues and subvalues) is deleted. If a subvalue is specified, then only the subvalue is deleted leaving its parent multivalue and field intact.

 

EXAMPLES

FOR I = 1 TO 20
    Numbers<I> = I   ;*generate numbers
NEXT I
FOR I = 19 TO 1 STEP -2
    DEL Numbers<I>   ;*remove odd numbers
NEXT I


jBC