The KILL command deletes local or global variables and their descendant nodes.
The format of the KILL command is:
K[ILL][:tvexpr] [glvn|[(]lvn[,...][)][,...]]
The optional truth-valued expression immediately following the command is a command postconditional that controls whether or not GT.M executes the command.
The optional global or local variable name specifies the variable to delete; KILL deletes not only the variable specified in the argument, but also all variables descended from that variable, that is, those starting with the identical key-prefix.
KILLing a variable that does not currently exist has no effect.
The KILL command without an argument deletes all currently existing local variables; in this case, at least two (2) spaces must follow the KILL to separate it from the next command on the line.
When a KILL argument is enclosed in parentheses, that "exclusive" KILL deletes all local variables except those listed in the argument.
An indirection operator and an expression atom evaluating to a list of one or more KILL arguments form a legal argument for a KILL.
KILL does not affect copies of local variables that have been "stacked" by NEW or parameter passing.
Because a KILL can have a major impact, use KILL with caution.