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

KILL

1990 Version of ANSI Standard

2.6.11 Kill

K[ILL] postcond

[ SP ]
SP L killargument


See 2.5.1 for the definition of postcond. See section 1 for the definition of L.

    killargument::=


glvn
( L lname )
@ expratom V L killargument



See 2.2.2.2 for the definition of glvn. See 2.2 for the definition of expratom. See section 1 for the definition of V. See section 1 for the definition of L.

    lname::=

name
@ expratom V lname


See 2.2.1 for the definition of name. See 2.2 for the definition of expratom. See section 1 for the definition of V.

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

   a) glvn: Selective Kill.
b) (L lname): Exclusive Kill.
c) Empty argument list: Kill All.

See section 1 for the definition of L.

Kill is defined using a subsidiary function K(V) where V is a glvn.

  1. Search for the name V in the NAME-TABLE. If no such entry is found, the function is completed. Otherwise, extract the DATA-CELL pointer and proceed to step 2.
  2. If V is unsubscripted, delete all tuples in the DATA-CELL.
  3. If V has subscripts, then let N be the number of subscripts in V. Delete all tuples in the DATA-CELL which have N or greater subscripts and whose first N subscripts are the same as those in V.

Note that as a result of procedure K, $D(V)=0, i.e., the value of V is undefined, and V has no descendants.

The actions of the three forms of Kill are then defined as:

   a) Selective Kill apply K to the specified glvn.
b) Exclusive Kill apply K to all names in the NAME-TABLE except those in the argument list. Note that the names in the argument list of an exclusive kill may not be subscripted.
c) Kill All apply K to all names in the NAME-TABLE.

If a variable N, a descendant of M, is killed, the killing of N affects the value of $D(M) as follows: if N was not the only descendant of M, $D(M) is unchanged; otherwise, if M has a defined value $D(M) is changed from 11 to 1; if M does not have a defined value $D(M) is changed from 10 to 0.

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)