Documentation | Help File | Scripter Studio | Pascal Language | Arrays
To construct an array, use “[” and “]” characters. You can construct multi-index array by nesting the array constructors. You can then access arrays using indexes. If an array is multi-index, separate indexes using “,”. If a variable is a variant array, script automatically supports indexing in that variable. A variable is a variant array if it was assigned using an array constructor, if it is a direct reference to a Delphi variable which is a variant array (see Delphi integration later) or if it was created using VarArrayCreate procedure.
Arrays in scripts have indexes starting from zero. Examples:
NewArray := [ 2, 4, 6, 8 ] ; Num := NewArray[1] ; //Num receives "4" MultiArray := [ ['green','red','blue'] , ['apple','orange','lemon'] ] ; Str := MultiArray[0,2] ; //Str receives 'blue' MultiArray[1,1] := 'new orange' ;