Hfree » History » Revision 3
Revision 2 (Per Amundsen, 05/24/2018 10:16 AM) → Revision 3/4 (Per Amundsen, 01/04/2019 09:19 PM)
_Added in 1.9.0_
*/hfree [-sw] <name>*
Deletes a hash table.
_See also [[/hsave]], [[/hsave]], [[/hmake]], [[/hadd]], [[/hdel]], [[$hget]], [[$hfind]]._
*Switches*
-s - Displays the result.
-w - Indicates name is a [[Scripting_Wildcards|wildcard]].
*Parameters*
<name> - The hashtable to delete.
*Example*
<pre>
alias example {
;Create the hash table 'hash'.
/hmake hash
;Print the hashtable size.
echo -a $hget(hash) : $hget(hash).size
;Creates the hash table 'h' with 10 items.
/hmake h 10
;Creates the hash table 'has' with 20 items.
/hmake has 20
;Delete hash table 'hash'.
/hfree -s hash
;Print the hashtable size.
/echo -a $hget(h) : $hget(h).size - $hget(has) : $hget(has).size
;Deletes any hash tables matching h*
/hfree -sw h*
}
</pre>