SteelArrow supports all primitve data types (integer, character, boolean, float) and
also supports TABLE and LIST objects.
TABLE objects can be defined as structures. They have the ability to store all other
variable types (including other tables). TABLE objects have columns or fields, and
rows in which to store information.
LIST objects are single dimensional arrays, that have the ability to store all other
data types (including other LISTs and TABLEs).
To change or create a variable, use the SteelArrow <SASET> tag. To output a
variable, use the SteelArrow <SAOUTPUT> or <SAOUTPUT> tag.
Accessing variables within TABLE or LIST objects can be done by scoping the contained
variable with the . (dot) operator. The following accesses the variable var within
the variable table; table.var
SteelArrow TABLE and LIST objects can contain any number of other variables, as a result
it is not uncommon to see code such as table.containedTable.containedList.var
Variables can also be accessed using the [] (square bracket) operators. The following shows
several dfferent examples of using the element access mechanism offered by [].
<!--- Index values are zero based in SteelArrow --->
<!--- Change the value of column 2 --->
<SASET NAME=table[1] VALUE="element 2">
<!--- Change the value of col 2, row 3 --->
<SASET NAME=table[1][2] VALUE="element 2_3">
<!--- Change the value of col 2, row 3, element 2 --->
<SASET NAME=table[1][2][1] VALUE="element 2_3_2">
<!--- Store the LIST at col 3, row 4 in list --->
<SASET NAME=list VALUE=table[2][3]>
<!--- Create a test string --->
<SASET NAME=string VALUE="Test String">
<!--- Change element 2 to 'oa' --->
<SASET NAME=string[1] VALUE="oa">
<!--- string now contains "Toast String" --->
|