Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Scripting Languages (http://www.programmingforums.org/forum39.html)
-   -   Help with TI BASIC (http://www.programmingforums.org/showthread.php?t=6191)

lj290 Sep 30th, 2005 6:09 PM

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)

DaWei Sep 30th, 2005 6:12 PM

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.

tempest Sep 30th, 2005 6:37 PM

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....

bl00dninja Sep 30th, 2005 7:01 PM

">FRAC" means nothing to me. like they said, post accordingly.

bl00dninja Sep 30th, 2005 7:03 PM

how in the fuck did you decide to post this in the forum "feedback and suggestions"?


hint: there is no correct answer for this.

lj290 Oct 1st, 2005 1:21 PM

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.

DaWei Oct 1st, 2005 1:44 PM

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.

lj290 Oct 1st, 2005 1:47 PM

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.

tempest Oct 1st, 2005 1:57 PM

[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.

Silvanus Oct 1st, 2005 3:57 PM

That looks godd- you'd probalby have to use ASM to make it display any better.


All times are GMT -5. The time now is 4:06 AM.

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