Variables

Variables are the program's memory: they keep the values you want to reuse or change.

What is a Variable?

A variable is a named container that holds a value.

X = 10

Using Variables

Once a variable is created, you can use it in expressions.

X = 10
PRINT X

Updating Variables

You can update a variable by assigning it a new expression. The debugger is useful here because it shows the value changing after each step.

X = 5
X = X + 2
PRINT X

Variable Types

MiniScript+ supports different types of values:

  • Numbers → 10, 3.14
  • Strings → "Hello"
  • Booleans → true, false
A = 10
B = "Hello"
C = true

Naming Variables

Variable names should be clear and meaningful.

score = 100
name = "Alex"

Avoid using spaces or special characters.