mk90.basic.statements

Statement LET

Assign an integer to one variable.

Syntax

[LET] variable = expression

Parameters

ParameterMeaning
variableOne letter A–Z, optionally followed by an array index in parentheses; case-insensitive.
expressionA numeric expression; stored as a signed 16-bit bit pattern.

Behavior

LET is optional. All 26 scalar variables start at zero on each execution. Array elements start at zero after DIM; a scalar and array of the same letter are independent. An indexed assignment evaluates the index before the right-hand side, then stores the result.

Example

10 A=2+3*4
20 LET B=A-1
30 PRINT A;",";B

Limits and diagnostics

Scalar names are single letters. DIM declares arrays; string variables and multi-letter names are outside this dialect.

Status-code reference.

See also

PRINT · FOR · Language syntax