# loop loop ## Function `loop` is a reserved compatibility form for an unconditional infinite loop. New code can also use `for {}` to express an infinite loop. ## Syntax ```bt loop { if condition { break } } loop:label { continue:label } ``` ## Example ```bt i = 0 loop { if i >= 3 { break } println i i += 1 } ``` ## Notes - It is recommended to use `for {}` first for new codes, and `loop` will continue to be compatible. - `loop` usually must be matched with `break` in the loop body, otherwise the program will keep running. - `continue` will skip the subsequent statements of this round and go directly to the next round. - The `loop` statement itself returns `empty`.