AutoIt+
  • Overview
  • Getting started
  • The language
    • Basic
    • Grammar
      • Expressions
      • Statements
      • Declarations
    • Operators
    • Variables
    • Types & values
      • Null
      • Booleans
      • Numbers
      • Strings
      • Functions
      • Classes
      • Pointers
    • Control flow
      • If statement
      • For loop
      • While loop
      • Break & continue
      • Error handling
    • Collections
      • Array
        • APIs
        • Implementation
      • Map
        • APIs
        • Implementation
    • Modules
    • Exceptions
  • Built-in modules
    • C
      • APIs
      • Constants
    • Math
      • APIs
      • Constants
    • Task
      • Types
      • APIs
    • Global
  • The aup
    • Compiler
    • Runtime
    • Options
Powered by GitBook
On this page
  • Break
  • Syntax
  • Examples
  • Continue
  • Syntax
  • Examples

Was this helpful?

  1. The language
  2. Control flow

Break & continue

To control the flow of a loop, we have two keywords break and continue.

Break

Break is used to terminate the loop.

Syntax

break

Examples

Breaking down an infinite loop

while true {
    break
}

var i = 1

while i++ < 10 {
    if i == 5 {
        break
    }
    else {
        puts i
    }
}

Continue

Continue is used to continue the loop contidion.

Syntax

continue

Examples



for {
    
}

PreviousWhile loopNextError handling

Last updated 4 years ago

Was this helpful?