Len: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.'' | |||
Len(''string'' | ''variable'') | Len(''string'' | ''variable'') | ||
== Description == | == Description == | ||
Len returns | Len returns an integer specifying the number of characters in a string, or the number of elements in an array. | ||
== Example == | == Example (Basic) == | ||
<pre> | <pre> | ||
Line 22: | Line 24: | ||
<pre> | <pre> | ||
Len of Frog: 7 | Len of Frog: 7 | ||
LenB of Frog: | LenB of Frog: 7 | ||
Len of Survived: 1 | Len of Survived: 1 | ||
</pre> | </pre> | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[Category:Strings]] | |||
[[Category:BASIC Functions]] |
Latest revision as of 15:29, 25 March 2019
This function is for BASIC compatibility. It is not available in pure JavaScript projects.
Len(string | variable)
Description
Len returns an integer specifying the number of characters in a string, or the number of elements in an array.
Example (Basic)
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: 7 Len of Survived: 1