LEN LENgth of string
Function
LEN gives the length of a string.
How to use LEN
LEN is followed by a string value, for example
50 LET x=LEN a$
An expression must be enclosed in brackets. LEN returns the number of characters in the string.
Example
The following line
120 INPUT a$: IF LEN a$>9 THEN GO TO 120
passes only strings that contain up to 9 characters.
Format
- LEN string-const
- LEN string-var
- LEN (string-expr)
See also