请问在VB中有没有中断for、while循环的函数,就是类似于C语言中的continue、break?急!!!

解决方案 »

  1.   

    break:do
        if ? then exit loop
    loopfor ? to ? 
        exit for
    nextcontinue:goto
      

  2.   

    for i = 0 to 100
       if i =50 then exit for 
      next
      

  3.   

    continue 好像没有break 有,就是 exit for 或 exit do
      

  4.   

    在VB里是没有continue的,不过可以通过在循环的最后条语句前加一个标签,然后GOTO这个标签来实现CONTINUE的功能,break的话是有的,exit for,exit do就是了。continue的演示:
    for * to *
        if 条件 then
          goto lbF
        endif
    lbF:
    next
      

  5.   

    exit for 或者是 eixt do
      

  6.   

    exit for 
    exit do 
      

  7.   

    没有continue函数,只能通过if来判断
    跳出循环上面说了.
      

  8.   

    exit for
    exit do
    或判断条件直接goto好了。