Lesson 4: Storing Data Into Variables
by Anthony Bush
A variable is simply something you can put information into so you can recall it later. There are several types of variables, first there is REAL, this is what we will cover in this lesson. REAL is a variable like 'A' or 'B' or 'C', etc. On the TI-85/86 you can name your REAL, but on the 82/83, they are predefined. You have 27, A through Z, and theta. Each real takes up 15 bytes of your calculators memory. To store a number into A simply type in the number, push the [STO] button (above the [ON] button), push [ALPHA], then 'A', or [MATH]. Then press enter. An example:
12345->A
           12345
It is the same in a program. Real can only save a number 14 digits long. However, when you display the number, the calculator will only show the first 10 digits. Another example:
12345678901234->A
   1.23456789E13
Don't worry if that last part confused you. Later on, I'll show you how you can read one of the numbers in an integer (this is how I was able to make the levels for Puzzle so small). For example, you have an integer 12345678901234. The 9th number from the left is 9 and the 9th number from the right is 6.
Summary:
In lesson 4 you should have learned how to store data into a real variable.

Previous Lesson | Home | Next Lesson


1