怎么样在一个SUB 里结束另一个SUB啊? 急!!!
热门软件下载:
我的代码示意如下:
private sub sub1
call sub2
...
...
...
end sub
private sub sub2
if (条件为真) then
结束sub1
end if
end sub
我真的不知道该怎么做了,请知道的指教啊,我在接一个项目,不能按期完工就死定了。
推荐阅读
放一个变量判断就行了。
public bl as boolean
bl= true
private sub sub1
call sub2
if bl = false then
exit sub1
end if
...
...
...
end sub
private sub sub2
if (条件为真) then
bl=false
end if
end sub
这样写法逻辑比较混乱。试试这样:
private sub sub1
if sub2=false then exit sub
...
...
...
end sub
private function sub2() as boolean
if (条件为真) then
sub2=false
end if
end sub
相关评论