Skip to content
Property Value
Hex Value $04
Categories
Localizations
  • FR:

Overview

Stores value in variable.

Availability: Token available everywhere.

Syntax

Store: value→variable

Arguments

NameTypeOptional
Store:
value
variable

Location

sto→


Description

The → (store) command will store a number, variable, or expression to a variable, using the respective value(s) of the variable(s) at the time. When storing a value in a variable, you have the value on the left side of → and the variable that it will be stored to on the right side.

:1→X
           1

:{1.3,5.7,9.11→ABC
           {1.3 5.7 9.11}

:"HELLO WORLD→Str1
           "HELLO WORLD"

Advanced

It's not easy to put a → symbol into a string, since "→→Str1 would produce a syntax error (and in general, when the calculator 'sees' a → symbol, it assumes that the string is over, and interprets the symbol literally).

However, you can use Equ►String( (outside a program) to get the → or " symbols in a string:

  1. Type them on the home screen and press [ENTER]
  2. Select 1:Quit when the ERR:SYNTAX comes up.
  3. Press [Y=] to go to the equation editor.
  4. Press [2nd] [ENTRY] to recall the symbols to Y1
  5. Now, use Equ►String(Y1,Str1) to store the symbols to a string.

Optimization

You can remove closing parentheses, braces, brackets, and quotes that are before a → command.

Here are a series of examples of using the → command. The first line of each example uses more bytes than necessary. The line following strips out the unnecessary characters and uses less bytes.

Real Variables
1/(2*(3/4))→X
1/(2(3/4→X
Strings
"Hello"→Str1
"Hello→Str1
Lists
{1,2,3,2(X+1)}→L₁
{1,2,3,2(X+1→L₁
5→L₁(1)
5→L₁(1
{4,5,6}→ʟLISTX
{4,5,6→LISTX

Tip: You can remove the ʟ character when storing an entire list to a custom named list, but you must keep the ʟ character present when storing to a specific item, such as 3→ʟLISTX(1


Source: parts of this page were written by the following TI|BD contributors: burr, DarkerLine, GoVegan, patriotsfan.

History

Calculator OS Version Description
TI-82 1.0 Added

Last update: July 29, 2024 19:47:40
Created: February 23, 2023 23:15:01
Authors: Adrien Bertrand