Next: , Previous: Operator Plus, Up: Expressions


6.4.19 The Operator ‘-

This operator may only be used in the following ways:

record - symbol
This yields record without the attribute named symbol, if symbol is an attribute name in record. If not, the expression yields record.
record - list
Here, list must be a list of symbols. This yields record without the attributes in list.
list - number
This yields list without the element at index number. If this element does not exist, the expression yields list.
list1 - list2
This yields the multi-set difference of the two lists list1 and list2. This means, it yields the list list1, but the first n appearances of each element will be deleted, if that element appears n times in list2.
number1 - number2
This yields the difference of number1 and number2.