Texas Instruments TI-Nspire CX CAS TINSPIRE-CX-CAS Leaflet

Product codes
TINSPIRE-CX-CAS
Page of 603
cos(π/4)
©
Displaying Information in the History
You can use the
Disp
command in a program or function to display information,
including intermediate results, in the history.
©
Disp 12•6
Disp "Result:",cos(π/4)
©
Displaying Information in a Dialog Box
You can use the
Text
command to pause a running program and display
information in a dialog box. The user clicks
OK
to continue or clicks
Cancel
to
stop the program.
You cannot use the
Text
command in a function.
©
Text "Area=" & area
©
Note:
Displaying a result with
Disp
or
Text
does not store that result. If you
expect to refer later to a result, store it to a global variable.
©
cos(π/4)→maximum
Disp maximum
©
Using Local Variables
A local variable is a temporary variable that exists only while a user-defined
function is being evaluated or a user-defined program is running.
Example of a Local Variable
The following program segment shows a
For...EndFor
loop (which is discussed
later in this module). The variable
i
is the loop counter. In most cases, the
variable
i
is used only while the program is running.
Getting Started with the Program Editor
523