LET
BASIC keyword | |
Keyword: | LET |
Abbreviation: | L, <SHIFT> + E |
Type: | Command |
Token code: | 136/$88 |
Handling routine in BASIC ROM: |
43429–43647 $A9A5–AA7F |
List of all BASIC keywords |
Remark: This article describes the BASIC command LET in BASIC V2 of the Commodore 64.
Typ: Command General Programming-Syntax: LET <Variable> = <Argument>
The BASIC command LET is used to assign numerical values or text as variables. Using the wrong type of variable results in the BASIC error message ?TYPE MISMATCH ERROR IN line number being displayed. In BASIC V2, assignment of variables can also be done without LET, so this command isn't used very often.
Examples[edit | edit source]
10 LET A$="MY " Assignment with LET 20 B$="COMMODORE" without LET 30 LET C$ = A$ + B$ 40 LET D1 = 64 50 LET A1% = 128 60 PRINT C$;" ";D1;" and ";A1%
ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | π | POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT