在VB中调用子程序的实例
来源:百度知道 编辑:UC知道 时间:2024/05/27 12:48:19
实例~!!!!
sub swap(a,b)
dim temp
temp=a
a=b
b=temp
end sub
'调用
dim a,b
a=10
b=5
print a;b
swap a,b
print a;b
private function add(byval a as integer,byval b as integer)
add=a + b
end sub
private sub test()
dim aa,bb,rr
aa=12
bb=4
rr=add(aa,bb)
msgbox rr
end sub