“Continue” (to next iteration) on VBScript

后端 未结 8 777
陌清茗
陌清茗 2021-02-03 17:43

A colleague and I were trying to figure out a way of doing the equivalent of a \"continue\" statement within a VBScript \"For/Next\" loop.

Everywhere we looked we found

8条回答
  •  你的背包
    2021-02-03 18:23

    Try use While/Wend and Do While / Loop statements...

    i = 1
    While i < N + 1
    Do While true
        [Code]
        If Condition1 Then
           Exit Do
        End If
    
        [MoreCode]
        If Condition2 Then
           Exit Do
        End If
    
        [...]
    
        Exit Do
    Loop
    Wend
    

提交回复
热议问题