Project

General

Profile

Hmake » History » Version 2

Per Amundsen, 01/17/2018 07:16 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*/hmake [-s] <name> <N>*
4
5
Creates a new hash table with N slots.
6
7
*Switches*
8
9 2 Per Amundsen
-s - Displays a creation result.
10 1 Per Amundsen
11
*Parameters*
12
13
<name> - The hashtable name to create.
14
<N> - The initial number of hashtable items.
15
16
*Example*
17
18
; call the setup once
19
; /example
20
;
21
; //echo -a $abbr(lol)
22
;
23
alias example {
24
  ;Create the table.
25
  /hmake abbr 1000
26
 
27
  ;Populate the table.
28
  /hadd abbr lol laughing out load
29
  /hadd abbr omg oh my gosh
30
  /hadd abbr lmao laughing my a?? off
31
  /hadd abbr brb be right back
32
}
33
; get the abbreviation
34
alias abbr return $hget(abbr, $1)