var / :=
Variable declaration and assignment.
Syntax
var name: Type; ... name := value;
Description
Variables are declared in the var block BEFORE begin. Assignment is done with := (colon equals). Types: Integer, Real, String, Boolean.
Example
Loading editor…
Expected output
Alex 36
When to use?
Storing all kinds of data.
Common mistakes
- ⚠️ Assignment uses :=, not =. = is for comparison only.