MTS 8: LISP and SLIP in MTS
June 1976
either adds to an existing Description List of the list LST or creates
one and places onto it the attribute-value pair AT and VAL. It does not
check whether the given attribute is already on an existing Description
List. The returned value is the alias of the Description List.
The function
NEWVAL(AT,VAL,LST)
on the other hand, searches the Description List of list LST for the
attribute AT. If the attribute is found, the function assigns the new
VAL to it and returns the old one. Otherwise both AT and VAL are added
to the Description List. If the Description List does not exist, an
empty one is created first. When either AT is not found or there is no
Description List, the value of the function is set to 0. Of course, if
distinction must be made between "no previous attribute AT" or "0
previous value of AT," a corresponding test should precede the use of
NEWVAL. Also, note the difference in the operation and in the returned
values between LDATVL and NEWVAL.
The function
NOATVL(AT,LST)
removes the attribute AT and its associated value from the Description
List of LST. The deleted value is the value returned by the function.
If either LST has no Description List, or the attribute AT is not on it,
the returned value of NOATVAL is 0, and no action is taken. Again, a
distinction must be made between "no previous attribute AT" and "0
previous value of AT."
The function
ITSVAL(AT,LST)
delivers as its value, the value associated with the attribute AT. If
the latter is not found, 0 is returned.
The function
MTDLST(LST)
empties the Description List of list LST if there is one; otherwise, no
action is taken. It returns the alias, LST, of the list.
The function
MADATR(AT,LST)
returns the name of the cell on the Description List that contains the
attribute AT. If the latter is not found, the function delivers -1.
130 SLIP