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 if / else conditions
  • Syntaxe
  • Condition:
  • Examples:

Was this helpful?

Edit on GitHub
  1. Features

Conditions

Create if / else conditions

Syntaxe

if (<condition>) {
    <block>
} else {
    <block>
}

Condition:

  • Anything with logical operator used for variables comparison

"!=" | "==" | ">" | "<" | ">=" | "<="| "&&" | "||"

Examples:

if (i <= 10) {
    <block>
} else {
    <block>
}

if (a % 2 != 0 && a % 3 != 0) {
    <block>
} else {
    <block>
}
PreviousLoopsNextInternal Functions

Last updated 1 year ago

Was this helpful?

✨