From WikiChip
Difference between revisions of "mirc/commands/hdel"
< mirc‎ | commands

(Created page with "The '''/hdel command''' deletes a key/value pair from an existing hash table. == Synopsis == /hdel [-sw] <table> <key> == Switches == * '''-s''' - Displays the assignment i...")
 
Line 2: Line 2:
  
 
== Synopsis ==
 
== Synopsis ==
  /hdel [-sw] <table> <key>
+
  /hdel [-sw] <nowiki><table></nowiki> <key>
  
 
== Switches ==
 
== Switches ==
 
* '''-s''' - Displays the assignment information
 
* '''-s''' - Displays the assignment information
* '''-w''' - Treats <table> as a wildcard and deletes all matching tables.
+
* '''-w''' - Treats <nowiki><table></nowiki> as a wildcard and deletes all matching tables.
  
 
== Parameters ==
 
== Parameters ==
* '''<table>''' - The table which contains the item you are deleting
+
* '''<nowiki><table></nowiki>''' - The table which contains the item you are deleting
 
* '''<key>''' - the key associated with a value to delete.
 
* '''<key>''' - the key associated with a value to delete.
  

Revision as of 04:56, 4 December 2013

The /hdel command deletes a key/value pair from an existing hash table.

Synopsis

/hdel [-sw] <table> <key>

Switches

  • -s - Displays the assignment information
  • -w - Treats <table> as a wildcard and deletes all matching tables.

Parameters

  • <table> - The table which contains the item you are deleting
  • <key> - the key associated with a value to delete.

Example

alias hdel_example {
  ;add items
  hadd -m example academic a
  hadd example academy a
  hadd example accelerate a
  hadd example accelerator a
  hadd example accept a
  hadd example access a
  hadd example accident a
  hadd example because b
 
  ;number of items
  echo -a $hget(example, 0).item
 
  ;remove everything by one
  hdel -w example a*
 
  ;number of items
  echo -a $hget(example, 0).item
 
  ;free table
  hfree example
}

Compatibility

Added: mIRC v5.8

Added On: 05/09/2000

Note: Individual switches were not taken into consideration.

See also