level 15
VB6没有Continue,可以把需要跳过执行的部分循环体放在块If结构中,或者当然也可以用GoTo实现
2025年05月25日 09点05分
2
goto肯定不好,如果内容多,if就很不好看了
2025年05月25日 12点05分
level 9
goto 也不是一定不好。是退出循环还是退出一次循环?还可以试试给循环变量赋值等方式。我没觉得vb的循环有什么不方便的。
2025年05月26日 05点05分
3
level 14
Do
… …
If 条件 Then GoTo Continue
… …
Continue:
Loop
2025年05月26日 12点05分
4
没错,只跳本次的continue,实际上就是goto
2025年05月27日 00点05分
![[大拇指]](/static/emoticons/u5927u62c7u6307.png)
vb怎么就没想到要有continue
2025年05月27日 00点05分
level 13
j = 1
do
for i = j to k
if 条件= true then j = i : exit for
next
loop while i < k
2025年06月04日 08点06分
7
level 5
我喜欢用 goto,缺点是:代码太长不好看。可以拆分成 sub
2025年09月12日 04点09分
9