logo
Amun Programming Language
Break
Initializing search
    amun-lang/Amun
    amun-lang/Amun
    • Home
    • Build
    • Compiler Options
      • Hello World
      • Comments
      • Values
      • Assignment
      • Variables
      • Destructuring
      • Const
      • Struct
      • Tuples
      • Enum
      • Arrays
      • Switch
      • For
      • While
      • Break
      • Continue
      • If
      • Defer
      • Function
      • Infix Function
      • Prefix Function
      • Postfix Function
      • Operator Overloading
      • Lambda
      • Memory
      • Varargs
      • Cast
      • Type Size
      • Type Align
      • Value Size
      • Generic
      • Type alias
      • Directives
      • SIMD
    • Contribute

    Break

    The break statement ends the loop immediately when it is encountered

    for {
        break;
    }
    

    By default breakends the current loop immediately but you can chooice which loop to end

    for 0 .. 10 {
        for 0 .. 10 {
            break 2;
        }
    }
    
    Copyright © 2022 Amr Heshan
    Made with Material for MkDocs