Releases: eantcal/nubscript
Releases · eantcal/nubscript
Rel 1.51
This release add a new variant type called Any and a set of API for managing hash tables.
Any
Any type declaration is implicit, so you can write
Dim x as Any
x="string" ' now x is a string
or just
x="string" ' now x is a string
Any type can be used also as function parameter, or function return type.
Hash tables
- hset "hashtablename", "key", value ' create a new hash table (if not existant) and insert <"key", value> entry
- result=hget("hashtablename", "key") ' result == value, where value can be any variable type
- hdel("hashtablename") ' remove the hash table
- hdel("hashtablename", "key") ' remove the hash table entry related to the key "key"
- hcnt("hashtablename") ' return the number of items of the hashkey hashtablename
- hchk("hashtablename","key) ' return true if <"key", value> entry exists, false otherwise