The following statements create a 3 row, 4 column array with the letters "A" through "L" with two different techniques and use a function to display each array.

aAlpha = new Array(3, 4)

aAlpha[1,1] = "A"; aAlpha[1,2] = "B"; aAlpha[1,3] = "C"; aAlpha[1,4] = "D"

aAlpha[2,1] = "E"; aAlpha[2,2] = "F"; aAlpha[2,3] = "G"; aAlpha[2,4] = "H"

aAlpha[3,1] = "I"; aAlpha[3,2] = "J"; aAlpha[3,3] = "K"; aAlpha[3,4] = "L"

displayArray(aAlpha)

aAlpha = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L" }

aAlpha.resize(3, 4)

displayArray(aAlpha)

The second array takes advantage of the literal array syntax, but resize( ) only creates a one- or two-dimensional array.

The displayArray( ) function is used to display the contents of the array in the results pane of the Command window. It is shown in the example for dimensions.