Len

From NSB App Studio
Revision as of 17:32, 8 July 2012 by Brendon (talk | contribs) (Created page with "LEN(''string'' | ''variable'') '''Description''' LEN returns a long value specifying the number of characters in a string, or the number of bytes required to output a variab...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LEN(string | variable)

Description

LEN returns a long value specifying the number of characters in a string, or the number of bytes required to output a variable. The optional parameter, string, is any valid string expression. The optional parameter, variable, is any variable, if variable contains a string the length of the string is returned. One (and only one) of the optional parameters, string and variable, must be supplied.

Example

REM LEN Example
'LEN returns string length or variable size
DIM Frog, Survived
Frog = "Staring"
Survived = 2
PRINT "LEN of Frog:", LEN(Frog)
PRINT "LENB of Frog:", LENB(Frog)
PRINT "LEN of Survived:", LEN(Survived)

Output

LEN of Frog:  7
LENB of Frog:14
LEN of Survived:     1