Basic computer language commands

Basic computer programming language

LEN FUNCTION

Purpose:

To return the number of characters in x$.

Syntax:

LEN(x$)

Comments:

Nonprinting characters and blanks are counted.

Example:

x$ is any string expression.

10 X$="PORTLAND, OREGON"
20 PRINT LEN(X$)
RUN
 16

Note that the comma and space are included in the character count of 16.

BASIC commands Main Menu

Index