| Keyword | Abbreviation | Token (hex) | Version(s) | Classification |
| LEN | none | C3 | 1.0+ | Function |
LEN (
string )
| Parameters | Type | Legal Value(s) | Default Value | Note(s) |
| string | String | any | | |
| Returns | Type | Value(s) | Note(s) |
| number | Integer | 0 to 255 | |
Returns the
number of characters in a text
string.
The LEN function simply returns the
number of characters in the given
string.
Useful for testing or manipulating strings.
TYPE MISMATCH ERROR is generated if a numeric expression or variable is supplied as a "string".
Examples:
PRINT LEN("")
0
READY.
PRINT LEN("65")
2
READY.
PRINT LEN(65)
?TYPE MISMATCH ERROR
READY.
PRINT LEN(STR$(65))
3
READY.
PRINT LEN(CHR$(65))
1
READY.
PRINT LEN(HEX$(65))
4
READY.
|
ASC,
DEC,
INSTR,
VAL
CHR$,
ERR$,
HEX$,
STR$
GET,
INPUT,
LEFT$,
MID$,
RIGHT$
© H2Obsession, 2014