Skip to Content

LET

LET is an optional assignment statement.

LET is not permitted in the assignment of the pseudo-variables LOMEM, HIMEM, PAGE, PTR# and TIME.

LET was mandatory in early versions of BASIC. Its use emphasised that when we write

X=X+4

we don’t mean to state that X equals X+4 - it can’t be, but rather ‘let X become equal to what it was plus 4’:

LET X=X+4

Most modern versions of BASIC allow you to drop the ‘LET’ statement. However, if you are writing a program for a novice, the use of LET makes it more understandable.

Syntax

[LET] <var>=<exp>

Associated Keywords

None

Last updated on