Please enable JavaScript to view this site.

A-Shell Reference

Navigation: A-Shell BASIC (ASB) > Variables > Collections > Grid Maps

Element Assignment and Removal

Scroll Prev Top Next More

Once declared, elements (i.e. row,col,value triplets) can be added to the gridmap with standard two-dimensional array assignment syntax, except for the variation with a string column index:

$table(n, "Description")  = "Left-Handed Smoke Shifter"    ! string column index

$table(row,col) = 123987     ! numeric row and column indices

 

As with ORDMAP, if the specified key exists already, the operation will replace the value of the existing element. To delete an element, a special value .NULL ("dot null") is assigned:

$table(row, "SerialNumber") = .NULL

Note: Assigning an empty string (“”) to the value of a key does not delete the item.