Skip to content
Jordan Leppert edited this page Jan 9, 2025 · 8 revisions

Values and the result of expressions can be assigned to variables using assignment operators.

There is no variable scope. All variables are global.

Variable names are case sensitive. They can contain uppercase and lowercase letters, underscores, and digits, although they cannot begin with a digit.

Examples:

a = 123
A = 123
a_23 = 123
_12b = 123

The = assignment operator outputs the value being assigned to the variable. Variables can be referenced in other parts of the statement where they're assigned, as long as the part of the statement where they're assigned is evaluated before the part where they're referenced. For example:

# This evaluates to 18
(b = 12) + (b / 2)

Constants

Constants are variables that have a built in value that can't be reassigned. They can be referenced the same way as variables.

Clone this wiki locally