Continue For loop

前端 未结 8 1734
面向向阳花
面向向阳花 2020-11-27 05:29

I have the following code

For x = LBound(arr) To UBound(arr)

    sname = arr(x)  
    If instr(sname, \"Configuration item\") Then  
        \'**(here i wa         


        
8条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 06:06

    I sometimes do a double do loop:

    Do
    
        Do
    
            If I_Don't_Want_to_Finish_This_Loop Then Exit Do
    
            Exit Do
    
        Loop
    
    Loop Until Done
    

    This avoids having "goto spaghetti"

提交回复
热议问题