Texas Instruments TI-89 Tip List page 366

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

then the expression results in a dialog box like this:
what?:
and the string that the user enters will be stored in myvar. The value of this approach is that the actual
prompt string and variable name can be stored in promptn and vname by preceding code, then the
single expr() executes the dialog box. In other words, you can change the contents of a dialog box as
needed, depending on run-time conditions.
This idea can be extended to all functions that can be used in a dialog box: Text, DropDown, and Title,
in addition to Request. The basic principle is to build the complete Dialog ... EndDlog block up as a
string. Each program line is separated by ":".
This dialog box demonstrates the use of all four dialog box functions.
To explain each option, as well as make it easier to build the dialog box, I have defined these functions:
dbttl():
Dialog box title (Title)
dbreq():
Dialog box request (Request)
dbdrd():
Dialog box drop-down menu (DropDown)
dbtxt():
Dialog box text string (Text)
dbend():
Terminate the dialog box string
These are the steps you use in your program to create the dialog box:
1. Initialize a string variable to start building the dialog box string
2. Call the four functions above, as needed, to make the dialog box you want
3. Terminate the dialog box string
4. Display the dialog box with expr()
The code shown below creates my dialog box example.
dbdemo()
Prgm
©dbdemo() - dynamic dialog box demo
©31 aug 99/dab
©dburkett@infinet.com
©Define local variables
local promptn,vname,boxtitle,sometext,ddtitle,dditems,ddvar,dbox
©Initialize dialog box items
"what number?"→promptn
"myvar"→vname
"BOX TITLE"→boxtitle
9 - 7

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents