Hi I forgot how to put a variable in a display command on the same line. The code looks like this:

:Input "(?,?)",A
:Disp "("+A+",?)"
You can't use Disp to put variables on the same line as text (at least not without converting to a string first)
You need to use Output and specify the location as the first line (or whichever you are using)
You could do this...
:Disp "(?,?)"

this will print (2,?) if A is 2, for example. But it won't work for anything other than single digits.
In your case, you want a string variable, not a real type variable.


Disp "Coord Pair (X, Y)"
Input "X = ",Str0
Input "Y = ",Str1
ClrHome .      // optional
Str2 = "("+Str0+", "+Str1+")"
Disp Str2

TI-Basic doesn't really let you display text and variables together, but you can do this through string concentation.
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