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
  • Block statement
  • Return statement
  • While statement

Was this helpful?

  1. The language
  2. Grammar

Statements

Block statement

blockStmt := '{' decl* '}'

A block is a list of declarations, so you can declare variables in side this statement. We put it between two curly braces.

Return statement

returnStmt := 'return' ( '\n' | expr )

If a newline occurs after "return", that means the function returns none. Otherwise, requires an expression.

While statement

whileStmt := 'while' expr blockStmt

PreviousExpressionsNextDeclarations

Last updated 4 years ago

Was this helpful?