sub. Subtracting hashes

^hash.sub[hash_to_be_subtracted]

The method subtracts
hash_to_be_subtracted from hash, deleting keys common for both hashes.

Example
$man[
   $.name[
Jack]
   $.age[
22]
   $.sex[
m]
]
$woman[
   $.name[
Mary]
   $.age[
20]
]
^man.sub[$woman]

As a result, hash
$man will remain with single key $man.sex containing value m.


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 30.03.2004