Declaration / Creation

Updated July 2015

DIMX $aryname, ordmap (varstr; varstr)

DIMX $aryname, ordmap (varstr; varx)

where

$aryname is the name of the ordered map. It follows the normal rules of ASB variable names except that it must begin with a $. Also note that although $aryname is an array, and you will need to use parentheses to reference it later, e.g. $aryname("some key") = "some value", the parentheses are omitted from the declaration.

ordmap(<keytype>;<datatype>) specifies the type of the key and the type of the data element. As of edit 1300, the only <keytype> supported was varstr (variable length string) and the only <datatype> supported was also varstr. Edit 1414 added support for <datatype> varx (variable length binary object, i.e. blob, structure, X type variable). Support for other types may be added in the future.

The ordered map grows dynamically as items are added to it and the keys and data are all variable length, so there is no need to declare any sizes.