Next: describe() Up: MacAnova Help File Previous: DATAPATHS   Contents


delete(var1[ ,var2, ...] [,all:T, real:T or F,char:T or F,\
  logical:T or F, structure:T or F,macro:T or F, graph:T or F,\
  lockedok:T, silent:T]), F's used only with all:T
delete(var, return:T [,invisible:T])

Keywords: variables, character variables
delete(var1,var2,...,vark) deletes the variables given as arguments and
frees the memory they use for other purposes.  The variables can be of
any type including MACRO or GRAPH.  It is an error if any arguments are
'locked'.  See subtopic 'variables:"locked_variables"' and topics
lockvars() and unlockvars().

delete(var1,var2,...,vark, lockedok:T) does the same, even if one or
more of the variables are locked.

You can use keywords 'real', 'char', 'logical', 'structure', 'macro',
'graph' and 'all' with LOGICAL values to delete classes of variables.

For example, delete(real:T, logical:T [,lockedok:T]) deletes all REAL
and all LOGICAL variables and delete(all:T, macros:F [,lockedok:T])
deletes everything except macros.  It is illegal to have both keyword
phrases specifying attributes and variables as arguments.

delete(var, return:T) deletes variable var but returns a copy as value.
This usage is most common as the last command in a macro when the value
the macro is supposed to be var, as in the following
  Cmd> mymacro <- macro("@tmp <- ($1)+($2)
         delete(@tmp,return:T)", dollars:T)

mymacro(x,y) prints descriptive statistics for x+y and returns x+y as
value, automatically deleting the temporary variable.  See also macro(),
'macro_syntax' and 'macros'.

delete(var, return:T, invisible:T) does the same except the value is
returned as an "invisible" variable (see 'variables').  The value can be
assigned to a variable but will not automatically print when it is not
assigned.  'invisible:T' is illegal without 'return:T'.  See topic

delete(var, return:F) is also legal and has the same effect as

delete(..., silent:T) suppresses all warning messages.  'silent:T' must
be last argument.

delete(CLIPBOARD) does not actually delete special variable CLIPBOARD
but clears its contents without affecting the system clipboard in any
way.  In the Motif version, delete(SELECTION) behaves the same.  See
topic 'CLIPBOARD'.

delete(GRAPHWINDOWS) does not actually delete special structure
GRAPHWINDOWS, but sets all its components to NULL, changing their names.
It does not affect what is displayed in the corresponding graphics
windows.  See topic 'GRAPHWINDOWS'.

See also topics list(), listbrief().

Gary Oehlert 2003-01-15