Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

KILL

1977 Version of ANSI Standard

3.6.10 KILL

K[ILL] postcond

[ Space ]
Space L killargument


    killargument::=


glvn
( L lvn )
@ expratom V L killargument



The three argument forms of KILL are given the following names.

  1. Empty argument list: Kill All.
  2. glvn: Selective Kill.
  3. (L lvn): Exclusive Kill.

Killing the variable M sets SD(M) = 0 and causes the value of M to be undefined. Any attempt to obtain the value of M while it is undefined is erroneous. The value of M remains undefined until M appears to the left of the delimiter = in an executed SET command. $D(M) remains 0 until M or a descendant of M appears to the left of the delimiter = in an executed SET command. Killing a variable whose $D = 0 has no effect.

To kill a variable with the unsubscripted name N also kills all subscripted variables with the same name N.

To kill an m-tuply subscripted variable N(v1, v2, ..., vm) with name N and subscript values v1, v2, ..., vm also kills all n-tuply subscripted variables N(v1, v2, ..., vm, vm+1, ..., vn), for all n > m, with the same N and identical values for the first m subscripts. (These derived n-tuply subscripted variables are called the "descendants" of the m-tuply subscripted variable.)

The Kill All form kills all local variables.

The Selective Kill form kills the variables named.

In the Exclusive Kill form lvn must not contain subscripts, although lvn may have descendants. Exclusive Kill kills all local variables except those named and their descendants.

If M is not killed but N, a descendant of M, is killed, the killing does not effect a change to the value of $D(M).

See also the transition diagram for Kill.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

This page most recently updated on 15-Nov-2023, 14:44:03.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)