repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
(DISTFILES): Comment out a few missing files.
[mono-project.git]
/
mcs
/
btests
/
LocalVariablesB.vb
blob
183998b0c6d4ca55fdab53d2117c6d1e712d0c8f
1
' Testing implicitly declared local varable in funtion
2
3
Imports System
4
5
Module
LocalVariablesB
6
7
Function
f1
(
ByVal
a
As
Integer
,
ByVal
b
As
Integer
)
As
Integer
8
f1
=
a
+
b
9
End Function
10
11
Function
f2
(
ByVal
x
As
Integer
)
12
f2
=
x
13
If
f2
=
0
Then
14
Return
0
15
Else
16
Return
f2
+
f2
(
f2
-
1
)
17
End If
18
19
End Function
20
21
22
Sub
main
()
23
24
Dim
a
As
Integer
25
26
a
=
f1
(
10
,
12
)
27
If
a
<>
22
Then
28
Throw
New
Exception
(
"#LV1"
)
29
End If
30
31
a
=
f2
(
5
)
32
If
a
<>
15
Then
33
Throw
New
Exception
(
"#LV2"
)
34
End If
35
36
End Sub
37
38
End Module