How to interrupt an Infinite Loop

前端 未结 12 1845
自闭症患者
自闭症患者 2021-02-02 10:36

Though I know it\'ll be a bit silly to ask, still I want to inquire more about the technical perspective of it.

A simple example of an infinite loop:

pub         


        
12条回答
  •  独厮守ぢ
    2021-02-02 10:59

    I think this is not possible. Only using break within the loop. You could use

    while(cond) {}
    

    And from some other place make it false

提交回复
热议问题