Updated project.
[mono.git] / mcs / btests / LabelA.vb
1 ' Positive Test
2 ' Test labels in functions
3 ' the prduction for LabelName is
4 ' LabelName ::= Identifier | IntLiteral
5 ' vide vbls71 section 10.1 Blocks
6 Imports System
7
8 Module labelA
9
10
11     Function Abs(ByVal x As Integer) As Integer
12
13         If x >= 0 Then
14             GoTo 1234234
15         End If
16
17         x = -x
18
19 1234234:
20         Return x
21
22     End Function
23
24
25     Sub Main()
26
27         Dim x As Integer, y As Integer
28         x = Abs(-1)
29
30         y = Abs(1)
31
32         If x <> 1 Then
33             Throw New Exception("#Lbl1")
34         End If
35         If y <> 1 Then
36             Throw New Exception("#Lbl2")
37         End If
38
39     End Sub
40
41
42 End Module