remove svn:executable property from *.vb
[mono.git] / mcs / mbas / Test / tests / LocalDeclarationA.vb
1 Imports System\r
2 \r
3 Module LocalDeclarationA\r
4 \r
5     Sub main()\r
6         Dim i, sum As Integer\r
7         For i = 0 To 4\r
8             sum = sum + f2()\r
9         Next\r
10         If sum <> 15 Then\r
11             Throw New Exception("#LD1: Static locals error")\r
12         End If\r
13     End Sub\r
14 \r
15     Sub f1()\r
16 \r
17         ' Various kinds of local decalations statements\r
18         Const a1 As Integer = 2\r
19         Static a2 As Double\r
20         Dim a3 As Integer ' Default value is initialized to 0 \r
21         Dim a4 As Boolean = True\r
22         Dim arr1() As Integer = {0, 1, 2, 3}\r
23         Dim arr2(,) As Integer = {{1, 2, 3}, {1 + 1, 1 + 2, 1 + 3}}\r
24         Dim arr3(10) As Integer ' An array of 11 integers indexed from 0 through 10\r
25         Dim arr4(2, 3, 4) As Date\r
26         Dim arr5() As Object\r
27         Dim b1, b2, b3, b4 As Integer\r
28         Dim c1 As Double, c2 As Boolean, c3 As DateTime\r
29         Dim d1 As New Date(2004, 8, 11)\r
30 \r
31     End Sub\r
32 \r
33     Function f2() As Integer\r
34         Static a As Integer\r
35         a = a + 1\r
36         Return a\r
37     End Function\r
38 \r
39 End Module