DESTROY

keywords

 *   --  all variables will be destroyed
 *V  --  all vectors will be destroyed
 *S  --  all scalars will be destroyed
 *M  --  all matrices will be destroyed
 *T  --  all text variables will be destroyed
 These keywords cannot be used with an expression.

index_ranges

 Index ranges are not allowed on scalars or matrices.  Index ranges on
 vectors are not allowed if an expression is entered. Subsets of vectors
 may be eliminated by including an index range. Subsets of scalar
 character variables may be eliminated by including a character index
 range. String elements of array character variables may be eliminated
 by including an index range and specific character subsets from specific
 string elements can be eliminated by including two sets of indices, one
 for the string elements and one for the character elements.

expression

 Elements of VECTORS ONLY can be eliminated depending on the value
 of an expression. Index ranges on the vectors are not allowed if an
 expression is entered. The expression is said to be true if its value is
 non-zero, and false if its value is zero. If the i'th element of the
 expression is true, the i'th element of each of the input vectors will
 be eliminated. The expression does not have to involve any of the
 vectors to be destroyed. All vectors in the expression must have the same
 length.

EXPAND

 Syntax: DESTROY v1 { v2 ... }
 Qualifier: \EXPAND
 Default: \-EXPAND
 Examples: DESTROY\EXPAND `X'//RCHAR(I)
           DESTROY\EXPAND TXTVAR

 By default, variable names are not re-constructed or expanded.  By using
 the \EXPAND qualifier, names can be entered that must be re-constructed,
 or character variables can be entered that can be expanded.

examples

 Suppose you want to delete from vector X all the elements that have a
 value between M and N.   DESTROY X =(X>M)*(X<N)   The expression is
 evaluated for each element of X and if the expression is true, the
 corresponding element is deleted from the vector X. Other vectors can
 also be entered, for example:  DESTROY X Y Z =(X>M)*(X<N)   If the j'th
 element of the expression is true, then elements X[j], Y[j] and Z[j]
 will be deleted. In this way, sets of data can be kept together.

 Suppose X, Y and Z are vectors, with X=[1:15].
 DESTROY X[5:15:5] Y Z   will leave X=[1;2;3;4;6;7;8;9;11;12;13;14]
 and variables Y and Z will be entirely destroyed.

 Suppose T is a scalar character variable, T=`this is a string'
 DESTROY T[1:4]    will leave T=` is a string'
 DESTROY T[1;3;7]  will leave T=`hs isa string'

 Suppose T is an array character variable with 12 string elements:
 T[1]=`January', T[2]=`February', T[3]=`March', T[4]=`April', etc.
 DESTROY T[2]   will eliminate the second string, and move `March' into
 the second string, `April' into 3, ..., `December' into 11.
 DESTROY T[1:12][1:2]  will eliminate the first and second characters
 from all 12 string elements, leaving T[1]=`nuary', T[2]=`bruary', etc.

 Suppose scalar I has the value 2, and the scalar text variable TXT has
 the value `X2'.   Then:
 DESTROY\EXPAND `X'//RCHAR(I)    will destroy X2
 DESTROY TXT                     will destroy TXT
 DESTROY\EXPAND TXT              will destroy X2