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

KILL

Draft MDC Standard

8.2.19 Kill

K[ILL] postcond killarglist

    killarglist::=

[ SP ]
SP L killargument


    killargument::=


glvn
( L lname )
@ expratom V L killargument



    lname::=

name
@ expratom V lname


The three forms of Kill are given the following names.

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

Kill is defined using a subsidiary function K( V, val, subs) where V is a glvn, val is 1, and subs is 1.

  1. Search for the name of 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 b.
  2. In the DATA-CELL identified in step ‘a’, let N be the number of subscripts in V. If V is unsubscripted, let N be 0:
    1. If N is 0, then delete all tuples. The function is completed.
    2. Otherwise (if N > 0), delete all tuples of degree N or greater whose first N subscripts are the same as those in V. The function is completed.

Note that as a result of procedure K(V , 1, 1), $Data(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 procedure K( glvn , 1, 1).
b) Exclusive Kill For all names, V, in the local variable NAME-TABLE except those in the argument list, apply procedure K( glvn , 1, 1). Note that the names in the argument list of an exclusive kill are restricted to unsubscripted locals.
b) Kill All For all names, V, in the local variable NAME-TABLE, apply procedure K(glvn , 1, 1). Note that Kill All applies procedure K to the local variable NAME-TABLE only.

If a variable N, a descendant of M, is killed, the killing of N affects the value of $Data(M) as follows: if N was not the only descendant of M, $Data(M) is unchanged; otherwise, if M has a defined value $Data(M) is changed from 11 to 1; if M does not have a defined value $Data(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.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

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

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