Conditional tests – Texas Instruments TITANIUM TI-89 User Manual
Page 603
Programming
603
Conditional Tests
Conditional Tests
Conditional Tests
Conditional Tests
Conditional tests let programs make decisions. For example, depending on whether a
test is true or false, a program can decide which of two actions to perform. Conditional
tests are used with control structures such as
If...EndIf
and loops such as
While...EndWhile
(described later in this module).
right
Returns a specified number of characters from the right side
(end) of a string.
rotate
Rotates the characters in a string. The default is L1 (rotate
right one character).
shift
Shifts the characters in a string and replaces them with
spaces. The default is
L
1 (shift right one character and
replace with one space). Examples: shift("abcde",2)
⇒
"cde "
and shift("abcde")
⇒
" abcd"
string
Converts a numeric expression into a string. This is the
opposite of the expr command.
Command
Description