Advanced TI-92 BASIC Programming By Anonymous This first lesson in Advanced BASIC will cover I/O procedures.

This first lesson in Advanced BASIC will cover I/O procedures (getting the program to interact with the user). Some vocabulary we will learn,

Dialog
EndDlog
Title*
Request*
Dropdown*
PopUp

*These commands must be in a Dialog... EndDlog block


The Main Idea of a program is to get something done for the user. For that to happen, the user must be able to communicate with the program. here are some ways to do that.

Dialog blocks.

An example,

Dialog
Title "This is a sample"
DropDown "Pick a year", {"1992","1993","1994"}, yr
Request "What is your favorite # ?", FavNum
EndDlog

You will need to have more lines to actually process the information you just received though. Speaking of receiving Info, what did we just receive and where did it go.

What the user inputted,

The year they picked

Stored as yr

yr will either = 1, 2, or 3 depending on which on you picked. If you picked 1992 then yr would=1, If you picked 1993 then it would = 2 and so on.

Their favorite #,

Stored as FavNum

FavNum will equal whatever you put in. ( It will be a string no matter what. You can make it an expression by using the Expr() command. That will come later though. )

Next is the PopUp command.

PopUp is basically a dropdown outside of a dialog box.

An example

PopUp {"A","B","C"}, pop

This commands gives you a little box with the items you specified in it. This is useful for programs where you don't need a prompt for the items

Example

In a BlackJack game where you have

If total<22 then
If total=11 or total=10 then
PopUp {"Hit","Stay","Double Down"},decide
If decide=3 then
Goto DblDn
Endif
ElseIf card1=card2 then
PopUp {"Hit","Stay","Split"},decide
Endif
PopUp {"Hit","Stay"},decide
Endif
Else
Goto Over21
EndIf

This allows the program to be able to respond to the environment i.e.. if the person was delt something that he could split or doubledown on.

This has an advantage over DropDowns because you don't have to put PopUps in a Dialog box.

Thats about it for Lesson # Eins, or 1. The next lesson will cover things involving the Custom and ToolBar statements. This should get interesting. I will publish an Appendix (One for each lesson) On neat ways to use all the commands I teach. Since some of you may know the commands, but need some new ways to use them to expand your use of advanced BASIC programming procedures.

Return to the index