thirdapple(第三只苹果) :
不行呀,exit for退出了整个FOR循环,我希望的是退出本次循环,接着执行step加1后的循环语句;

解决方案 »

  1.   

    break是跳出单层循环的么???for i=0 to 20
        if xx then goto aa
        xxxxx
        xxxx
        xxxxxaa:
    next i
      

  2.   

    kingcom(猪眼看人生SP1|不当帮主了) :谢谢,go to应该是可以的,请问还有别的方法吗?
    break不是吗?那就是continue了,不好意思!
      

  3.   

    直接用
    if *** then
    next i 
    不可以吗?
      

  4.   

    for i=0 to n
      if xx then
         :
         :
         :
      end if
    next i
      

  5.   

    kingcom(猪眼看人生SP1  ¦不当帮主了)  :          谢谢,给你加分了!可以给我留个mail地址吗?有问题好请教!
      

  6.   

    C中应该是 continue。
    在vb中可以在 NEXT 前一句设置标签,然后用 goto 语句。
    虽然 goto 不太令人喜欢,但偶尔用用还是可以的。