Re: TIB: TI-86 BASIC question


[Prev][Next][Index][Thread]

Re: TIB: TI-86 BASIC question




Ok - one problem is this:
If a user types in EQUIP at
:Prompt A,
they're going to get an error.  The calculator won't see it as a string - it 
will see it as a value, and there is no value stored to EQUIP.

The problem with TI-Basic is that you can't create modules and the such, 
like you can in QBasic.  You might consider creating a separate program 
called EQUIPS, or something like that.  Don't make the user type in the word 
'EQUIP' every time, either.  Have them type in 'E', or something short.  
Assign a value to 'E' in the beginning of the program (for example, 5 -> E) 
- if the user types in E, then 5 is stored to A.  Then your code may look 
like this:

:Pause "1=N, 2=E, 3=S"
:Prompt A
:If A==1
:Goto TWO
:If A==2
:Goto CLOSET2
:If A==3
:Goto BEGINNING
:If A==5
:EQUIPS

If the user types E, 5 is stored in A, and the program calls up another 
program, called EQUIPS.  EQUIPS could be the program that displays weapons 
and asks the user what s/he wants to select.  When they're finished 
selecting, the program EQUIPS ends, and returns to the first program, 
starting right from where it left off.  (Don't forget to include the RETURN 
command at the end of the EQUIPS program.)

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com