We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
String output (Read 814 times)
String output
Mar 15th, 2007, 5:31pm
 
Guys im using this typing example (without the pealing effect)
http://processing.org/learning/examples/typing.html

Just wanna know, if i do a printl(""+buff);
it gives me my input backwards...so if i type 'abc' i get back 'cba'

Any idea how i can output it correctly?
Re: String output
Reply #1 - Mar 15th, 2007, 6:17pm
 
unfrtunately that example stored the input backwards, to make it easier to draw.

You need to change the line in keyPressed: buff=k+buff; to buff=buff+k;
Re: String output
Reply #2 - Mar 17th, 2007, 2:21am
 
Thanks JohnG =)
Just tried that there and now if i type in 123456,
when i type it in it comes up 654321 but now the output of the string is coming up correct (123456).... Hope that makes sense..
Thanks for the help mate...
Re: String output
Reply #3 - Mar 22nd, 2007, 5:18pm
 
Does ANYONE know how to fix this???
(have the string output and input correctly)
ANY help would be great....
Page Index Toggle Pages: 1