Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

256 LET Purpose In BASIC we often write things like X=6 meaning put 6 into the box labelled X in the computer. The fact that we are changing the contents of the variable X can be made clearer by writing LET X=6 The statement X=X+6 is impossible in mathematical terms. How can something be the same as itself plus 6? In BASIC though it is quite legal to say LET X=X+6 since the instruction simply means ‘store in the variable X whatever is already there plus 6’, or ‘increase the value of X by 6’. The word LET is optional, but its use makes the program more readable.

Examples 100 LET length=15 980 LET DAY$ ="Tuesday" 210 IF A=6 THEN LET length=12 Description LET is an optional assignment statement. Note: LET may not be used during the assignment of the pseudo-variables LOMEM , HIMEM , PAGE , PTR# , TIME . Syntax [ LET ] =