<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ALength</id>
	<title>TI-BASIC:Length - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ALength"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Length&amp;action=history"/>
	<updated>2026-04-17T18:39:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Length&amp;diff=776&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Length&amp;diff=776&amp;oldid=prev"/>
		<updated>2016-02-24T18:18:03Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Command&lt;br /&gt;
|picture=LENGTH.GIF&lt;br /&gt;
|summary=Returns the length of a string.&lt;br /&gt;
|syntax=length(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&lt;br /&gt;
|location=This command can only be found in the catalog. Press:&lt;br /&gt;
# 2nd CATALOG to access the command catalog&lt;br /&gt;
# L to skip to commands starting with L&lt;br /&gt;
# scroll down to length( and select it&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|size=2 bytes&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This command is used to determine the length of a string. Unlike the [[TI-BASIC:Dim|Dim(]] command for lists and matrices, it cannot be used to change this length, as there is no null character for strings (the null value is 0 for lists and matrices).&lt;br /&gt;
&lt;br /&gt;
 :length(&amp;quot;HELLO&lt;br /&gt;
 	5&lt;br /&gt;
&lt;br /&gt;
Keep in mind that the length is measured in the number of tokens, and not the number of letters in the string. For example, although the sin( command contains 4 characters (&amp;quot;s&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;n&amp;quot;, and &amp;quot;(&amp;quot;), it will only add 1 to the total length of a string it&amp;#039;s in. The execution time for length( is directly proportional to the length of the string.&lt;br /&gt;
&lt;br /&gt;
= Advanced Uses =&lt;br /&gt;
&lt;br /&gt;
The code for looping over each character (technically, each token) of a string involves length(:&lt;br /&gt;
&lt;br /&gt;
 :For(N,1,length(Str1&lt;br /&gt;
 ...&lt;br /&gt;
 use sub(Str1,N,1 for the Nth character&lt;br /&gt;
 ...&lt;br /&gt;
 :End&lt;br /&gt;
&lt;br /&gt;
= Related Commands =&lt;br /&gt;
&lt;br /&gt;
* [[TI-BASIC:Expr|Expr(]]&lt;br /&gt;
* [[TI-BASIC:Instring|InString(]]&lt;br /&gt;
* [[TI-BASIC:Sub|Sub(]][[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>