Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/boblio-max/origin/llms.txt

Use this file to discover all available pages before exploring further.

Origin’s control flow syntax is designed to be clean and English-like while remaining unambiguous for both humans and automated tools. All block bodies — whether they belong to an if, a for, or a while — are wrapped in curly braces { }. There are no indentation rules to enforce: the braces define structure. This page covers every branching and looping construct available in Origin, along with the full set of comparison and logical operators you can use inside conditions.

if / elif / else

Conditional execution uses the if keyword, with optional elif chains and a final else fallback. Conditions can use any comparison or logical operator:
let score: int = 85

if score >= 90 {
    print "Grade: A"
} elif score >= 75 {
    print "Grade: B"
} elif score >= 60 {
    print "Grade: C"
} else {
    print "Grade: F"
}
Use === for strict equality (type + value) and !== for strict inequality when you need to distinguish between values that compare equal under loose rules:
let mode: str = "auto"

if mode === "auto" {
    print "Autonomous mode active"
} else {
    print "Manual override"
}

for Loops

Iterating with range()

The range(start, end) built-in generates an integer sequence from start (inclusive) to end (exclusive), exactly like Python’s range:
for i in range(0, 10) {
    print i
}

Iterating over a List

You can loop directly over any list variable:
let sensors: list = ["temp", "humidity", "pressure"]

for sensor in sensors {
    print sensor
}

while Loops

A while loop runs its body as long as its condition is truthy:
let count: int = 0

while count < 5 {
    print count
    count += 1
}

break and continue

Use break to exit a loop immediately and continue to skip to the next iteration:
for i in range(0, 100) {
    if i === 10 {
        break
    }
    print i
}

pass

The pass statement is a no-op placeholder. Use it to satisfy a required block body when you have nothing to execute yet:
def on_event(name) {
    pass
}

Comparison Operators

OperatorMeaning
==Loose equality
!=Loose inequality
===Strict equality (type + value)
!==Strict inequality
<Less than
>Greater than
<=Less than or equal
>=Greater than or equal
<>Alias for !=

Logical Operators

Origin accepts both English-style keywords and symbolic forms — choose whichever reads more naturally in context:
Keyword formSymbol formMeaning
and&&Logical AND
or||Logical OR
not!Logical NOT
if temp > 80 and humidity > 60 {
    print "Warning: hot and humid"
}

if not flag {
    print "Flag is false"
}
Logical operators can be freely combined in a single condition. Origin evaluates them left to right, with comparisons resolved before logic operators:
let x: int = 15

if x > 10 and x < 20 or x === 0 {
    print "x is in range or zero"
}

Build docs developers (and LLMs) love