Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Sep 30th, 2005, 6:09 PM   #1
lj290
Newbie
 
lj290's Avatar
 
Join Date: Sep 2005
Location: NY
Posts: 4
Rep Power: 0 lj290 is on a distinguished road
Send a message via AIM to lj290
Help with TI BASIC

I need help. I am working on a program which converts fractions, but when I get to using the >FRAC function, it reduces it! Needless to say, this makes the program useless. However, I won't give up! It's my first program, and I want it to work! So, does anyone know how to override the reduction (code soon to follow)
lj290 is offline   Reply With Quote
Old Sep 30th, 2005, 6:12 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
That's nice. Please read the forum's FAQ/rules and some of the "How to Post..." threads. Your post should contain all the helpful information you can provide, including code snippets, BEFORE you post. It makes for more effective responses. Inasmuch as this isn't feedback or a suggestion, I would suspect another forum, perhaps under the MISC category, would be appropriate.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Sep 30th, 2005, 6:37 PM   #3
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 been programming in TI-Basic in my math classes for 3yrs now... today i wrote a program to find the max of an equation... including decimals. The only way to override the simplification of >FRAC is to write a method to do it yourself... which is pointless. Why does reducing make your program useless? Maybe there is another way to solve your problem.

P.S. As DaWei said, please post in the right forum next time. I shouldn't help you until it gets moved there, honestly, to make an example. But since you're new i'll let it slide....
__________________

tempest is offline   Reply With Quote
Old Sep 30th, 2005, 7:01 PM   #4
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
">FRAC" means nothing to me. like they said, post accordingly.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Sep 30th, 2005, 7:03 PM   #5
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
how in the fuck did you decide to post this in the forum "feedback and suggestions"?


hint: there is no correct answer for this.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Oct 1st, 2005, 1:21 PM   #6
lj290
Newbie
 
lj290's Avatar
 
Join Date: Sep 2005
Location: NY
Posts: 4
Rep Power: 0 lj290 is on a distinguished road
Send a message via AIM to lj290
Listen, I'm sorry, but I'm new here. I apoligize for any inconvenience that i've caused any of you.
Now, if anyone still wants to help me, here's the code:

:ClrHome
:Disp "CONVERSIONS"
:Output(4,1,"ENTER FRACTION")
:Input "NUMERATOR",N
:Input "DENOMINATOR",D
:Input "ENTER DESIRED DENOMINATOR",E
:(D/E)->P
:(P*N)->X
:(P*D)->Y
:Disp X/Y>Frac
:Stop
:End

Now my problem here is that the ">Frac" command's default action is to simplify the fraction. Naturally, this makes my program useless. That's why I need help overriding this function somehow, don't care how.

P.S. Okay, now its been moved.
__________________
Lj290

Last edited by lj290; Oct 1st, 2005 at 1:42 PM.
lj290 is offline   Reply With Quote
Old Oct 1st, 2005, 1:44 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You're still being rude to your potential respondents by not reading the rules and posting properly (one of which is to put your code in tags). It's possible you don't perceive it as rudeness, mere accident. That's why it is recommended that you read the rules and "How to post...." threads FIRST. Of course, spoiled people think such suggestions are always for others, and that their needs and desires come first.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 1st, 2005, 1:47 PM   #8
lj290
Newbie
 
lj290's Avatar
 
Join Date: Sep 2005
Location: NY
Posts: 4
Rep Power: 0 lj290 is on a distinguished road
Send a message via AIM to lj290
I'm not a spoiled person. I honestly am truly sorry for not posting correctly and will strictly adhere to the How to post . . . rules from now on.
__________________
Lj290
lj290 is offline   Reply With Quote
Old Oct 1st, 2005, 1:57 PM   #9
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
[php]:
ClrHome
Disp " Frac Convert",""
Input " Num? ", N
Input " Den? ", D
Disp ""
Input " New den? ", E
D/E->P
PN->N
PD->D
ClrHome
Disp " Frac Convert",""
Disp N,"",D
Output(4,16,"/")
Pause
ClrHome
Output(1,1, " ")[/php]

That's the best suggestion i have, can't think of a better way myself that doesn't require ALOT of coding....

Tip #1: The ":" Character taking up the first line of the prgm tells the Mirage OS to put the program in its list of executable programs on the calculator... There should be no space before this symbol when you write the program on the calc... that's an issue with the forum.

Tip #2: The last 2 lines clear the screen and then output a blank character to the upper left of it... this gets rid of the pesky "Done" message.
__________________

tempest is offline   Reply With Quote
Old Oct 1st, 2005, 3:57 PM   #10
Silvanus
Hobbyist Programmer
 
Silvanus's Avatar
 
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4 Silvanus is on a distinguished road
That looks godd- you'd probalby have to use ASM to make it display any better.
Silvanus 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 11:10 PM.

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