252
edits
mNo edit summary |
|||
Line 326: | Line 326: | ||
|syntax = delete(hash, key); | |syntax = delete(hash, key); | ||
|source = {{simgear file|simgear/nasal/lib.c|l=83|t=Source}} | |source = {{simgear file|simgear/nasal/lib.c|l=83|t=Source}} | ||
|text = Deletes the key from the hash if it exists. Operationally, this is identical to setting the hash value specified by the key to <code>'''nil'''</code> | |text = Deletes the key from the hash if it exists. Operationally, this is NOT identical to setting the hash value specified by the key to <code>'''nil'''</code> as the key will stay in the hash (at least for a while). This variant potentially frees storage by deleting the reference to the key and by shrinking the hash. Returns the hash that has been operated on. | ||
|param1 = hash | |param1 = hash | ||
|param1text = The hash from which to delete the key. | |param1text = The hash from which to delete the key. |
edits