Typical array declarations | ||
        Dim intValue (9) As Integer |
        | 'Index values are 0-9 |
        Dim intValue (1 To 10) as Integer |
        | 'Index values are 1-10 |
        Dim intValue (4, 4) as Integer |
        | 'A two-dimensional array |
        Dim intValue (1 To 5, 1 To 5) as Integer |
        | 'Another two-dimensional array |
Dim cRate (1 To 10) As Single
cRate(1) = .01
cRate(2) = .02
cRate(3) = .03
cRate(4) = .04
cRate(5) = .05
cRate(6) = .06
cRate(7) = .07
cRate(8) = .08
cRate(9) = .09
cRate(10) = .10
Dim cRate (1, 4) As Single
cRate(0, 0) = .04
cRate(0, 1) = .05
cRate(0, 2) = .06
cRate(0, 3) = .07
cRate(0, 4) = .08
cRate(1, 0) = .045
cRate(1, 1) = .055
cRate(1, 2) = .065
cRate(1, 3) = .075
cRate(1, 4) = .085
A For...Next statement that puts the numbers 1 through 10 in an arrayDim iIndex As integer, iArray (1 To 10 As Integer |
A For...Next statement that puts the numbers 2, 4, 6, 8, and 10 into array items 2, 4, 6, 8, and 10Dim iIndex As Interger, iArray (1 To 10) As Integer |