Okay, I'm making a math program that needs to display text strings and number variables together.

ex:
"X^2+" B "X+" A "=" C

Is this possible to do on the same line with disp, or am I going to need a counter variable to check my position on the X axis and use a bunch of outputs to write this? I searched google and a few tutorials, but couldn't come up with anything. I could probably get it to work with 6 outputs, but I don't want to waste my precious RAM...

Also, using a string isn't a problem. If I could get all of these values into a string and print it that way, it would be fine. I just don't know how to get them all into the same string...
Outputs. Do it this way:


Code:
Output(1,1,"X^2+    +X      =
Output(1,3,B
Output(1,6,A
Output(1,12,C
Oh, wow. I never even thought about putting all of the string parts in the same output. Thanks.
Haha, no prob. The only thing to be careful of is to make sure that your values aren't gonna be larger than N number of characters (N depending on how you space that initial Output statement)
I think you can achieve the same result, but accounts for size much better with the text trick.

Code:
Text(-1,0,0,"X^2+",B,"X+",A,"=",C
As you can see you can separate terms with a comma and it will put exactly the correct amount of space needed for the given values of A, B, and C.
That's true, I usually resort to that. I thought that foamy3 wanted it solely on the homescreen though.
Well, with the big text, it sure looks like the homescreen. Wink
But then you also need to Text(-1.... the rest of it.
Oh, that works, too. I got the multible output thing working, though. Thanks, again!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement