In addition to traditional arrays, ASB supports the following types of collections:
dimx $CAPITALS, ordmap(varstr;varstr) ! map of strings ... $CAPITALS("FRANCE") = "PARIS" |
|
---|---|
dimx $STATES, ordmap(varstr;varx) ! map of blobs/structures ... Map1 STATE,ST_STATE ... $STATES(“California”) = STATE ! load structure into map ... STATE = $STATES(“California”) ! retrieve structure from map by key ? STATE.POPULATE, STATE.CAPITAL, … ! access members |
|
dimx $JSONDOC, mlist(varstr) ! JSON doc stored as multi-level list ... $JSONDOC(.pushback) = name$ + ":" + value$ ! push name:value pair on end of list |
|
dimx $GMAP, gridmap(int, int, varstr) ... $GMAP(row, col) = "Blue Moon" |
|
imx $GMAP, gridmap(int, varstr, varstr) ... $GMAP(row,"Nationality") = "Utopian" |