EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Tip List

Texas Instruments TI-89
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #363 background imageLoading...
Page #363 background image
[9.3] Take advantage of ok system variable in dialog boxes
The Dialog...EndDlog structure always shows two button choices: [ENTER] and [ESC]. If [ENTER] is
pressed, the system variable ok is set to 1. If [ESC] is pressed, ok is set to zero. You can use this
information to exit the program if [ESC] is pressed, or return to a main program screen, or take some
other appropriate default action.
[9.4] Displaying more lines on the 92+ program I/O screen
The Disp() function is used to display strings on the program I/O screen. As more lines are displayed,
previous lines scroll off the top of the display. Only 8 complete lines can be shown at once. This
program can be used to legibly display 10 lines at once:
disprc(lcdrow,lcdcol,outstr)
Prgm
output 10*lcdrow,6*lcdcol,outstr
EndPrgm
lcdrow is the row (0 to 9) at which to display the text.
lcdcol is the character column (0 to 39) at which to display the text.
outstr is the string to display
40 characters can be displayed on each line. Note that you can also use this method to quickly update
display screens in your programs, when only a small part of the screen changes.
You can squeeze 11 lines on the display by changing
10*lcdrow to 9*lcdrow, but this is not as
legible because the lines are very closely spaced.
[9.5] Default values for variables in Request
Request is used in dialog boxes for prompt for user input. You can save your users a lot of time if you
provide default values, and remember those defaults. However, there is a problem if the variables are
numbers, since Request returns strings. This code gets around this problem:
string(x) x
dialog
request "Enter x",x
enddlog
expr(x) x
This code assumes that x has a numeric value on entry, which is the default. The string() function
converts x to a string for use in Request. When the dialog box exits, expr() converts the string to a
number so you can use it in calculations.
If x is a local variable, you need to initialize it to the default first. If x is a global variable, the last-used
value is the default the next time you run your program. While this is very convenient, it does take up
RAM.
If you do use a global variable, it needs to be initialized the first time you run the program, otherwise
the dialog box will look like this:
9 - 4

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals