Gentee Programming Language > Documentation > Libraries | Download documentation |
Variables of the hash type allow you to work with associative arrays or hash tables. Each item in such an array corresponds to a unique key string. Items are addresses by specifying the corresponding key strings.
Operations defined for the variable of hash type are listed below. The second column contains possible statements where typename is a variable or an expression of the specified type.
Operation Syntax Return type Comments Variable description - Hash array description. If no item type is specified, uint is used. [] item type Getting an item by a key string. In case there is no item, it will be created automatically. * uint Get the number of items. foreach Looking through all items with the help of the foreach operator. foreach cur, myhash
{
...
}
foreach Looking through all keys with the help of the foreach operator. foreach cur, myhash.keys
{
...
}
hash.clear | Clearing a hash array |
hash.create | Creating an item with this key |
hash.del | Deleting an item |
hash.find | Finding an item |
hash.ignorecase | Ignoring the letter case of keys |
hash.sethashsize | Set the size of a value table |
![]() |
![]() Copyright © 2004-2006 Gentee Inc. All rights reserved. ![]() |