Programming
601
How Strings Are Used
How Strings Are Used
How Strings Are Used
How Strings Are Used
A string is a sequence of characters enclosed in "quotes." In programming, strings allow
the program to display information or prompt the user to perform some action. For
example:
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 you cannot use a string such as "
61
" or "
2x+4
" in a calculation, you can convert
a string into a numeric expression by using the
expr
command.
Disp "The result is",answer
– or –
Input "Enter the angle in degrees",ang1
– or –
"Enter the angle in degrees”
!
str1
Input str1,ang1
Содержание Voyage 200
Страница 36: ...Getting Started 36 D B D B Press Result ...
Страница 45: ...Getting Started 45 3 0 D B D D B D Press Result ...
Страница 46: ...Getting Started 46 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Страница 60: ...Getting Started 60 B D Press Result ...
Страница 139: ...Previews 139 8 Complete the operation Press 2 d Steps and keystrokes Display 5 f 2 ...
Страница 181: ...Operating the Calculator 181 From the Keyboard From the Keyboard From the Keyboard From the Keyboard ...
Страница 453: ...Differential Equation Graphing 453 ...
Страница 468: ...Tables 468 ...
Страница 515: ...Split Screens 515 Note Both Top Bottom and Left Right splits use the same methods to select an application ...
Страница 777: ...Activities 777 ...