GLaDOS
  • Home
  • 🌴Introduction
    • Installation
    • Basic Code example
    • Syntax Overview
  • 🤖Developpers
    • Parsing
    • Verbose Mode
  • ✨Features
    • Types
    • Operators
    • Lists
    • Includes
    • Syntactic Sugar
    • Loops
    • Conditions
    • Internal Functions
    • Recursivity
    • Prototypes
    • Error handling
    • Comments
    • Scopes
  • 📚Libraries
    • Mathematics
Powered by GitBook
On this page
  • Create a for loop
  • Syntaxe
  • Variables declaration:
  • Condition:
  • Variable update:
  • Examples:

Was this helpful?

Edit on GitHub
  1. Features

Loops

Create a for loop

Syntaxe

for (<variable-declaration> ; <condition> ; <variable-update>) {
    <block>
}

Variables declaration:

  • Classical variable declaration with syntax:

<identifier> : <type> = <value>;

Condition:

  • Classical condition to stop the for loop.

Variable update:

  • Classical assigment to variable in for scope.

Examples:

for (i: Int = 0; i < 10; i++) {
    <block>
}
for (; 1 == 1; ) {
    <block>
}

PreviousSyntactic SugarNextConditions

Last updated 1 year ago

Was this helpful?

✨