Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Feb 11th, 2006, 3:03 AM   #1
Mouche
Newbie
 
Mouche's Avatar
 
Join Date: Dec 2005
Location: Oregon
Posts: 22
Rep Power: 0 Mouche is on a distinguished road
TI89 programming

I'm not sure this is the right forum, but here is my problem. I am creating a program that solves the quadratic formula using the values you insert. You can select different menu items to obtain an approximate or exact (radicals and such) answer, or you can select whether your answers are real or complex. This program will evolve to not depend on the selection menu positive and negative, but for now, I just need to figure out how to make it work.

I keep getting a "Missing (" error on my Texas Instruments 89 calculator when I run my program:

quad()
Prgm
ClrIO
Dialog
Title "Quadratics Solver"
Text "              Solving Ax®+Bx+C"
Text "               By Glen Winters"
Text "                    Version 1.0"
EndDlog
If ok=0 Then
Goto end
EndIf

Lbl top

Toolbar
Title "Quadratics"
Item "Neg",n
Item "Pos",p
Title " i?"
Item "Real",r
Item "Complex",c
Title "Precise"
Item "Exact",e
Item "Approx",a
EndTBar

Lbl n
Input "A?",a1
Input "B?",b1
Input "C?",c1
(b1^2-4*a1*c1)»d1
If d1<0 Then
If (setMode("Complex Format","RECTANGULAR")) Then
Goto end2
EndIf
Disp "No real solutions"
Else
((ªb1^2+§(d1))/(2*a1))»ans1
Disp ans1
EndIf
Goto end2
Lbl p
Input "A?",a2
Input "B?",b2
Input "C?",c2
(b2^2-4*a2*c2)»d2
If d2<0 Then
If (setMode("Complex Format","RECTANGULAR")) Then
Goto end2
EndIf
Disp "No real solutions"
Else
((ªb2^2-§(d2))/(2*a2))»ans
Disp ans
Goto end2

Lbl r
setMode("Complex Format","REAL")
Goto top

Lbl c
setMode("Complex Format","RECTANGULAR")
Goto top

Lbl e
setMode("Exact/Approx","EXACT")
Goto top

Lbl a
setMode("Exact/Approx","APPROXIMATE")
Goto top

Lbl end2
setMode("Complex Format","REAL")
EndPrgm

Thanks in advance!
__________________
--Programmer in-training--

"I think there is a world market for maybe five computers."
- Thomas Watson, chairman of IBM, 1943

Last edited by Mouche; Feb 11th, 2006 at 3:06 AM. Reason: Needed more detail
Mouche is offline   Reply With Quote
Old Feb 11th, 2006, 1:00 PM   #2
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
Well, remember that the calculator programming on most of those are very similar to basic. I have heard that there are a lot of problems with a particular release of the ti-89 series. I would google it. If I were you , I would use a ti-86 (If they still make those. I know that a lot of teachers hated it because it was powerful enough to put anything on it)
Indigno is offline   Reply With Quote
Old Feb 13th, 2006, 7:37 PM   #3
Mouche
Newbie
 
Mouche's Avatar
 
Join Date: Dec 2005
Location: Oregon
Posts: 22
Rep Power: 0 Mouche is on a distinguished road
Well, I figured out that my "ans" variable was already in the system as a function, so it was looking for parentheses and parameters. I fixed that and I received another error! It points to the very end of the program around the EndPrgm section... What could be wrong?!
__________________
--Programmer in-training--

"I think there is a world market for maybe five computers."
- Thomas Watson, chairman of IBM, 1943
Mouche is offline   Reply With Quote
Old Feb 13th, 2006, 8:09 PM   #4
FredVietnam
Newbie
 
Join Date: Feb 2006
Location: Northern Kentucky
Posts: 9
Rep Power: 0 FredVietnam is on a distinguished road
Send a message via AIM to FredVietnam Send a message via MSN to FredVietnam
i find that programming on a TI-83 plus is much simpler and is very easy to learn i have been doing it for 4 years now
FredVietnam 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 4:42 PM.

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