Len: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
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..."
 
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
LEN(''string'' | ''variable'')
Len(''string'' | ''variable'')


'''Description'''
== 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.
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'''
== Example ==


<pre>
<pre>
REM LEN Example
Rem Len Example
'LEN returns string length or variable size
'Len returns string length or variable size
DIM Frog, Survived
Dim Frog, Survived
Frog = "Staring"
Frog = "Staring"
Survived = 2
Survived = 2
PRINT "LEN of Frog:", LEN(Frog)
Print "Len of Frog:", Len(Frog)
PRINT "LENB of Frog:", LENB(Frog)
Print "LenB of Frog:", LenB(Frog)
PRINT "LEN of Survived:", LEN(Survived)
Print "Len of Survived:", Len(Survived)
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
LEN of Frog:  7
Len of Frog:  7
LENB of Frog:14
LenB of Frog:14
LEN of Survived:    1
Len of Survived:    1
</pre>
</pre>
[[Category:Language Reference]]

Revision as of 02:03, 17 August 2012

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