Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 20th, 2005, 10:14 PM   #1
davidguygc
Programmer
 
Join Date: Mar 2005
Location: Lubbock, TX
Posts: 30
Rep Power: 0 davidguygc is on a distinguished road
TI BASIC help

I'm sorry for putting this in this forum, but it's as close to a TI forum as I can find. Is there a way give the calculator instructions in case of the variable being null?
Thanks to anyone who can help,
David
davidguygc is offline   Reply With Quote
Old Mar 20th, 2005, 11:14 PM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Yea, are you talking about like A-Z number vars, lists, strings, matrixes, pics, or gdb's?

I know everything about TI-Basic, lol.
__________________

tempest is offline   Reply With Quote
Old Mar 20th, 2005, 11:16 PM   #3
davidguygc
Programmer
 
Join Date: Mar 2005
Location: Lubbock, TX
Posts: 30
Rep Power: 0 davidguygc is on a distinguished road
I'm using an 89, and so say i want someone to make a choice in a dropdown menu, and if they hit cancel, keep the program from saying undefinded variable error and just give it instructions on what to do, such as ending the program
davidguygc is offline   Reply With Quote
Old Mar 20th, 2005, 11:41 PM   #4
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
I've only written on TI-83+, if you could show me some code i might be able to help you out. On TI-83+ there is something called the menu() function which creates a menu with a title, and options and references to label name's that it's sent to...


TI-Basic(83+) Menu Example:

ClrHome
Lbl M
Menu("  Test program  ", "Goto A", A, "Exit", E)
Lbl A
ClrHome
Disp "This is a test"
Pause
Goto M
Lbl E
ClrHome
Output(1,1," ")
__________________

tempest is offline   Reply With Quote
Old Mar 20th, 2005, 11:58 PM   #5
davidguygc
Programmer
 
Join Date: Mar 2005
Location: Lubbock, TX
Posts: 30
Rep Power: 0 davidguygc is on a distinguished road
OK
Dialog
Title  "The Ultimate Pre-Cal Program"
DropDown  "Calculate:",{"Area of „","Comp Angles","Degree»Radian","Grade","Find Quadrant","sin, cos, etc.","Distance"},feat
EndDlog

Determining feature 
If feat=0 Then
Goto  quit
ElseIf feat=1 Then
Goto  „a
ElseIf feat=2 Then
Goto  comang
ElseIf feat=3 Then
Goto  dtr
ElseIf feat=4 Then
Goto  grade
ElseIf feat=5 Then
Goto  quad
ElseIf feat=6 Then
Goto  sct
ElseIf feat=7 Then
Goto  dist
EndIf

but if you hit the ESC button, it doesnt give a number to the variable, and it continues on to the Ifs, and it is still undefined so it crashes, I have on other programs, set feat to 0 after the goto so it will have the
If feat=0 Then
Goto Quit 
EndIf
but if I want to retain the previous selection, I can't use it, which makes me want to know if there is some sort of NULL feature I can put into the coding
davidguygc is offline   Reply With Quote
Old Mar 30th, 2005, 5:47 PM   #6
lunardragoon
Newbie
 
Join Date: Mar 2005
Posts: 1
Rep Power: 0 lunardragoon is on a distinguished road
hmmm, I also just program on the TI-83 Plus but...I'll try not to be technical
ok, so you want to retain the previous selection...here we go then

Try this (in psuedocode since i havent programmer 89's):
( -> denotes that value is being stored to variable aka 1->A places the value 1 into A)



[beginCode]

...The first line of your programs initialize (declare your variables set to 0)...

...begining of program...
0->prevchoice
0->choice

...somewhere else in the program...
choice->prevchoice
0->choice
Dialog
Title "The Ultimate Pre-Calculus Program"
DropDown "Calculate:",{"Area of „","Comp Angles","Degree»Radian","Grade","Find Quadrant","sin, cos, etc.","Distance"},choice
EndDlog

...i modified this part...
if choice=0 Then
prevchoice->choice
goto quit
ElseIf feat=1 Then
Goto a
ElseIf feat=2 Then
Goto comang
ElseIf feat=3 Then
Goto dtr
ElseIf feat=4 Then
Goto grade
ElseIf feat=5 Then
Goto quad
ElseIf feat=6 Then
Goto sct
ElseIf feat=7 Then
Goto dist
EndIf
[endCode]

I dont know if that will work, but just maybe..... get back with me on the results

Last edited by lunardragoon; Mar 30th, 2005 at 5:53 PM. Reason: Didnt see the end of the post with the code :)
lunardragoon is offline   Reply With Quote
Old Mar 31st, 2005, 10:37 PM   #7
davidguygc
Programmer
 
Join Date: Mar 2005
Location: Lubbock, TX
Posts: 30
Rep Power: 0 davidguygc is on a distinguished road
Actually, I was just thinkin about doing that just the other day. The Chances of that working is 95%, so thank you a bunch. I am really suprised that there aren't that many 89 programmers out there. Take it easy
--David
davidguygc is offline   Reply With Quote
Old Apr 2nd, 2005, 9:39 PM   #8
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Does this language not have a select statement?
Rory is offline   Reply With Quote
Old Apr 2nd, 2005, 9:55 PM   #9
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
Rory, it doesn't have shit. I'm not really sure I would call it a programming language...
uman is offline   Reply With Quote
Old Apr 3rd, 2005, 10:02 PM   #10
davidguygc
Programmer
 
Join Date: Mar 2005
Location: Lubbock, TX
Posts: 30
Rep Power: 0 davidguygc is on a distinguished road
i wouldn't really call it a language either. You can run the program just by typing it into the home screen. I've actually confused myself, because it seems like a language, and it technically might be a language....idk.
davidguygc is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:54 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC