Project

General

Profile

Actions

Hmake » History » Revision 4

« Previous | Revision 4/5 (diff) | Next »
Per Amundsen, 01/04/2019 09:18 PM


Added in 1.9.0

/hmake [-s] <name> <N>

Creates a new hash table with N slots.

See also /hsave, /hload, /hfree, /hadd, /hdel, $hget, $hfind.

Switches

-s - Displays a creation result.

Parameters

<name> - The hashtable name to create.
<N> - The initial number of hashtable items.

Example

; call the setup once
; /example
;
; //echo -a $abbr(lol)
;
alias example {
  ;Create the table.
  /hmake abbr 1000

  ;Populate the table.
  /hadd abbr lol laughing out load
  /hadd abbr omg oh my gosh
  /hadd abbr lmao laughing my a?? off
  /hadd abbr brb be right back
}
; get the abbreviation
alias abbr return $hget(abbr, $1)

Updated by Per Amundsen almost 6 years ago · 4 revisions

Also available in: PDF HTML TXT