projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* Mono.Posix.dll.sources: Rename Mono.Posix to Mono.Unix.
[mono.git]
/
mcs
/
mbas
/
Test
/
tests
/
LabelC.vb
1
' Positive Test
2
' Test labels in functions
3
Imports System
4
5
Module labelC
6
7
8
Function Abs(ByVal x As Integer) As Integer
9
10
If x >= 0 Then
11
GoTo x
12
End If
13
14
x = -x
15
16
x:
17
y:
18
z:
19
Return x
20
21
End Function
22
23
24
Sub Main()
25
Dim x As Integer, y As Integer
26
x = Abs(-1)
27
y = Abs(1)
28
29
If x <> 1 Then
30
Throw New Exception("#Lbl1")
31
End If
32
If y <> 1 Then
33
Throw New Exception("#Lbl2")
34
End If
35
36
37
End Sub
38
39
40
End Module