What are Variables?

TI-Basic is unusual among programming languages in that it does not support actual variables. Instead, all data are treated like files; there is no distinction between an ordinary number and an image, for example. TI refers to all files as "variables;" henceforth "variable" will refer to a file usable by a program. "Variables" are the meat of any programming language - they are used to store and work with data. With variables, the outcomes of programs can differ depending on the user's input or the purpose of the program. Variables in the TI calculators can store different types of data, whether it be numbers, lists of numbers, strings, mathematical functions, etc. However, each data type has its own type of variable that it can be stored in and the rules must be followed fairly strictly.

Storing and Recalling Variables

Variables can be stored and recalled at the Homescreen (the startup screen), or within a program by simply using that variables name. For example, to recall the variable X at the Homescreen, one would simply type X and hit enter (which would display 10 if X was ten):


or to recall Str1:


The format to recall any variable is the same.

To store a value to a variable, you simply state the value you are trying to store, hit the store key (the button STO>), then the variable you are storing to, and then hit enter. For example, making X equal to 52.5 would be as follows:


It should be noted that 52.5 was displayed after hitting enter on the homescreen. This is because it also recalled the value of the variable after storing it. In programming, the variable isn't actuall recalled, but rather the variable in used in some sort of equation. See the individual examples for more help.

Types of Basic Variables

There are many types of variables, but in this chapter, only the most common ones will be dealt with. The Advanced Variables section, will deal with the more complex variable types and uses. The following sections will deal with:

  • Real Numbers (i.e. 52.5)
  • Lists (1,2,3,4,5)
  • Strings ("APPLES")

Real Numbers

For easability in this section/chapter, it should be noted that the variables 'A' through 'Z' and the variable theta are considered to be Real Number Variables.

Real number variables store both an integer and decimal part of a number. Examples of real numbers are 0, 2.1, 5, 7.212 or 3.1415926. Reals are accurate up to eight significant digits and can be in the range of -9e99 to 9e99 (that is 9*10^99). If an attempt is tried to exceed this limit the calculator returns an error.


To store a number to a Real Variable, the syntax is as follows:

  • Where value is a literal value, a variable, or an expression and
  • Where variable is the variable to store value to
    • Can be 'A' through 'Z' or theta.
      • The variables are accessed by pressing the green ALPHA key, then finding the corresponding green character key on the keypad.

Ex: Literals

Ex: Variable

Ex: Equation

*Note: In this example, if A was 89, X would be 42, not the actual equation. Only the result of an equation is stored to X (the equation is 5+36+89/89 = 42, so X is 42)


For easability in this section/chapter, all lists will be considered as Real Number Lists.

Lists are basically what they sound like - lists of numbers. They are considered by some to be the same as an array. They store a series of numbers which are the same datatype (for this section we will assume that it is a Real Number List). The individual numbers of a list are named elements.

  • Where value1,value2 through valueN' are real number elements
    • The number of elements (values) in a list is only limited by the memory of the calculator
    • The minimum number of elements a list can contain is 0.
  • Where listName is the name of a list. This can be one of two types:
    • Calculator defined: L1,L2,L3,L4,L5,L6
    • User defined: a small 'L' (found via the list menu) followed by up to five characters denoting the name

Ex: Literals

Ex: Custom Named list

Ex: List to List

Ex: Equations

*Note: In this example, L1 would consist of {20,25,30} because each element was increased by five then stored to L1


  • Where string is the string literal, or some other form of string to store to strN and
  • Where strN is one of the predefined strings for the calculator. These are Str1, Str2, Str3, Str4, Str5, Str6, Str7, Str8, Str9 and Str0

Ex: Literals

Ex: Str to Str

Ex: Combination

This page uses content from Wikibooks. The original book was at TI-Basic 84 Programming. The authors of this book were Jimmyatic and Dlrohrer2003. As with TI-BASIC Wiki, the text of Wikibooks is available under the Creative Commons Attribution-Share Alike License.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.