Skip to content
ffredyk edited this page Jul 23, 2026 · 1 revision

true

Category

Value Constructor

Arity

Nular — no operands.

true

Description

Returns the Boolean value true. Used in conditional expressions, logical operations, and as a literal constant.

How It Works

true compiles to a nular command that pushes the singleton Boolean true onto the VM stack. It is a compile-time constant — no runtime computation.

Usage

Conditional checks

if (true) then {
    systemChat "Always runs";
};

Loop control

while { true } do {
    if (_done) exitWith {};
    sleep 0.1;
};

Flag variables

_initialized = true;
_isRunning = true;

Ternary-like patterns

_result = if (_cond) then { "yes" } else { "no" };

Thread Safety

ReadOnly — Boolean values are immutable singletons. Safe from any scheduler.

See Also

SQ# Wiki

Home

Engine Docs

Migration

Commands

Value Constructors

Arithmetic

Comparison

Logic

Array

String

Math

Random

Type & Introspection

HashMap

Code Execution

Concurrency

Scheduler

Thread Safety

Error

Output

Time

Multiplayer

Compiler

Clone this wiki locally