LEN

From C64-Wiki
Jump to: navigation, search
BASIC keyword
Keyword: LEN
Abbreviation:
Type: Function
Token code: 195/$C3
Handling routine
in BASIC ROM:
46972–46986
$B77C–B78A
List of all BASIC keywords


Remark: This article describes the BASIC-Command LEN in BASIC V2 at the Commodore 64.

Typ: Numeric Function 
General Programming-Syntax: LEN(<String>)


The function LEN views the number of all chars in a string.

When the string is missing, the BASIC-error ?TYPE MISMATCH ERROR IN line appears. When the numbers of all chars in a string greater than 255 chars the BASIC-error ?STRING TO LONG IN line occur. When the numeric argument is absent, it appears a ?SYNTAX ERROR IN line.

Examples[edit]

PRINT LEN("The output has got this number of chars:") 
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