LET

From C64-Wiki
Jump to navigationJump to search
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 at the Commodore 64.

Typ: Command 
General Programming-Syntax: LET <Variable> = <Argument>

The BASIC-Command LET will be used for assign numerical values or chars in the right type of variable. By using the wrong type of variable the BASIC-error ?TYPE MISMATCH ERROR IN line number occur. 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%  
BASIC V2.0 (second release) Commands

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