Multi-Dimensional Array

< ="text/">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; min-height: 14.0px}

How do we declare a multi-dimensional array in Scripter?

Neither of these seem to work:

myArray: array[0..3, 1..24] of String;


myArray: array[[0..3], [1..24]] of String;

Any ideas?


Rhett Price

Array declaration, for now, only supports unidimensional arrays. For multidimensional you should use VarArrayCreate:

var A;

  A := VarArrayCreate([0, 3, 1, 24], 12);
  A[2, 3] := 'Wagner';
  A[3, 4] := 'Hello, ';
  ShowMessage(A[3, 4] + A[2, 3]);                  

Thanks Wagner - got it.