Declaration and array variable use

Top  Previous  Next

Array variables can be declarate using SetArray function. Function parameters are variable name, type ( CHAR, STRING, INTEGER, FLOAT, BOOLEAN ), number of elements.

 

Example:

 

SetArray(MonthsList,STRING,12); //MonthsList is an 12 elements array

 

The notation used to refer to an element of an array consists of the variable name followed by square parentheses containing an index number. The index number have to be defined in the range 0 and (number of element-1).

 

Example:

 

MonthsList[0]:=January;

MonthsList[1]:=February;

...

MonthsList[11]:=December;