Education Technology

# Knowledge Base

## Solution 12134: Using Strings on the TI-89 Family, TI-92 Family, and Voyage™ 200.

### How are strings used on the TI-89 Family, TI-92 Family, and Voyage 200?

Strings are a sequence of characters enclosed in "quotes". Strings are used to enter and display text characters. Strings can be entered directly or stored to a string variable. In programming, strings allow the program to display information or prompt you to perform an action.

Examples:

Input "Enter the angle in degrees", angle1
"Enter the angle in degrees" ->str1

Some input commands, such as InputStr, automatically store user input as a string and do not require the user to enter quotation marks.

A string cannot be evaluated mathematically, even if it appears to be a numeric expression. For example, the string "61" represents the characters "6" and "1", not the number 61.

Although strings such as "61" or "2x+4" cannot be used in a calculation, they can be converted into numeric expressions by using the expr() command.

To convert a numeric value into a string, use the string() command. The syntax of the command is string(Expression). The command simplifies the expression and returns the result as a character string.

Example 1:

Disp string(5+7) will return "12"

Example 2:

:Prgm
:...
:5->a
:12->b
:Disp "Your total is " & ""& string(a+b)&""& " books."
:...
:EndPrgm

When this part of the program executes, the calculator will display "Your total is 17 books."

To find out about the rest of the string commands available, please see case 12161: String Commands on the TI-89 family, TI-92 family, and Voyage 200 graphing calculators.

Please see the TI-89 family, TI-92 family and Voyage 200 guidebooks for additional information.