Difference between revisions of "TI-BASIC:Clrlist"
(Initial automated import) |
(Automated @@ correction) |
||
Line 2: | Line 2: | ||
|picture=CLRLIST.GIF | |picture=CLRLIST.GIF | ||
|summary=Sets the dimension of a list or lists to 0. | |summary=Sets the dimension of a list or lists to 0. | ||
− | |syntax=ClrList ''list1'', | + | |syntax=ClrList ''list1'', <nowiki>[</nowiki>''list2'', ''list3'', ...] |
|location=Press: | |location=Press: | ||
# STAT to access the statistics menu | # STAT to access the statistics menu |
Latest revision as of 21:40, 24 February 2016
Command Summary
Sets the dimension of a list or lists to 0.
Command Syntax
ClrList list1, [list2, list3, ...]
Menu Location
Press:
- STAT to access the statistics menu
- 4 to select ClrList, or use arrows.
TI-83/84/+/SE
1 byte
ClrList sets the length of a list (or several lists) to 0. This is virtually equivalent to deleting the list, except for two differences:
- The list still exists -- it will be shown in the memory management menu and the list menu
- Calling the Dim( command on it will return 0, rather than an error.
In practice, there is rarely a reason to use this command over DelVar.
Advanced Uses
You might use ClrList when building up a list element by element and using dim( in the process:
:ClrList L1 :While 10>dim(L1 :Input X :X→L1(1+dim(L1 :End
You may be thinking to yourself, "That is an extremely contrived example!" That's because that is an extremely contrived example. The truth is there is no good reason to use ClrList.
Optimization
Using DelVar instead of ClrList allows you to save a tiny bit of memory (between 12 and 16 bytes) that ClrList doesn't delete, while keeping almost every aspect of the list clearing the same.
Error Conditions
- ERR:SYNTAX is thrown if you leave off the ∟ symbol when referring to a custom list (i.e., ClrList B will not work; you have to use ClrList ∟B).