nes-pascal

Assignments

Assignment uses :=:

BackgroundColor := $21;
Counter := $FF;
Enabled := true;

The right-hand side may be:

Both sides must have exactly the same type. There are no implicit conversions. Reading a variable before an earlier assignment is a compilation error. Constants cannot be assignment targets.

Value parameters are initialized local copies and may also be assignment targets inside their declaring procedure. Assigning a parameter does not modify the caller’s argument.

Definite-assignment analysis follows structured control flow. The detailed rules for branches, loops, and procedure calls are documented with those constructs.

Assignment diagnostics preserve the earliest primary error:

Whole-program checks such as E3003 run only after statement-level semantic analysis succeeds. See the diagnostics reference for the complete index, explanations, examples, and suggested fixes.

Initialized byte variables can also be changed with inc and dec.