Example:

  1. ' This example demonstrates some of thefeatures of arrays. The lower bound

    ' for an array is 0 unless it is specified or option base has set as is

    ' done in this example.

    Option Base 1

    Sub Main

    1. Dim a(10) As Double

      MsgBox "LBound: " & LBound(a) & " UBound: " & UBound(a)

      Dim i As Integer

      For i = 0 to 3

      1. a(i) = 2 + i * 3.1

      Next i

      Print a(0),a(1),a(2), a(3)

    End Sub