| Ti-83 Basic | |
| The Basics 1.1: Getting Started 1.2: The "Disp" Command 1.3: The "Input" Command 1.4: Strings 1.5: If-Then Statements 1.6: "For" Loops 1.7: "While" Loops 1.8: The "Getkey" Command Creating Menus 2.1: Lbl and Goto Commands 2.2: The "Menu" Command Graphics 3.1: Setting up for Drawing 3.2: Graphing 3.3: Graph-Coordinates Drawing 3.4: Screen-Coordinates Drawing 3.5: Pictures 3.6: "Input" Revisited 3.6: Advanced Menus 3.8: Dynamic Menus 3.9: Dialog Boxes Miscellaneous 4.1: Memory Management 4.2: Creating Lists and Saved Games 4.3: Using with MirageOS 4.4: Tips and Hints | Creating Lists and Saved Games Creating Lists
Creating lists is fairly easy, but reading from them and using them as files gets very complicated. It's also a good introduction to what you'll be doing A LOT of in assembly. But, first thing's first. Why use lists over matrices, etc.? The nifty thing about lists is that they're the only variable on the calculator that can be modified by a BASIC program that can be named. There are only A-J in matrices, A-Z in variables, etc. But lists can be named LFILE or anything else.
The calculator has six built in lists, L1-L6. These should not be modified by a user's program unless the purpose is to specifically import or export data from/to them. It's best to create one's own list. Storing data to a list is much like storing it to a variable. However, one must use {brackets} and commas. To store the numbers one through five to a list (L1, for example), use the following code:
Now, let's create a custom list!
Custom list names can only be 5 letters long, and must have the small "L" in front of them to denote their listiness :). To create a list called LABC, store data, such as {1,2,3} to it. To get the small "L" token, press [2nd][List]{Right}[B]. So your code should look like:
It's important to know how to store and read specific elements in a list. This is done with using parentheses after a list variable. For example, to read the 7th number in L1, you would recall L1(7). To store a number to a place in the list, use something like "5->L1(7)". Be warned! that reading or writing to an element that does not exist (for example, trying to store 1 to L1(6) when L1 only has 3 entries) will cause an error.
A good way to read lots of elements from a list is using a For loop. To read every element from list 1, use this loop:
This is where things can get a little complicated and confusing, so I apologize in advance if this is a little less clear. Your programs want to store data, right? What a better place to store it than a list! You can name it whatever you want, you can easy read things from it, and it protects your data from other programs messing it up. |
![]() The text in this tutorial is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. | |

