3 Module LocalDeclarationA
11 Throw
New Exception("#LD1: Static locals error")
17 ' Various kinds of local decalations statements
18 Const a1
As Integer = 2
20 Dim a3
As Integer ' Default value is initialized to 0
21 Dim a4
As Boolean = True
22 Dim arr1() As Integer = {0, 1, 2, 3}
23 Dim arr2(,) As Integer = {{1, 2, 3}, {1 + 1, 1 + 2, 1 + 3}}
24 Dim arr3(10) As Integer ' An array of 11 integers indexed from 0 through 10
25 Dim arr4(2, 3, 4) As Date
27 Dim b1
, b2
, b3
, b4
As Integer
28 Dim c1
As Double, c2
As Boolean, c3
As DateTime
29 Dim d1
As New Date(2004, 8, 11)
33 Function f2() As Integer