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.
IndexProgramming Questions & HelpPrograms › Noob can't get println to do anything
Page Index Toggle Pages: 1
Noob can't get println to do anything (Read 758 times)
Noob can't get println to do anything
Apr 13th, 2010, 5:53am
 
Hiya.  I'm just getting started with Processing and I'm trying to do a simple:

println("Hello World!\n");

All I get is a grey square with this.  I also tried copy pasting the println example from the reference pages and I get the same result.  This problem doesn't seem to be in the faq and I can't find anyone else talking about this problem on the forums, so I can only conclude that I'm being a complete moron.  Could anyone explain what I'm doing wrong?
Re: Noob can't get println to do anything
Reply #1 - Apr 13th, 2010, 6:22am
 
First note: \n is a bit redundant with the "ln" part of the function, unless you want to skip two lines.
Second note: you should indicate which version of Processing you have downloaded, and on which system you use it.
Re: Noob can't get println to do anything
Reply #2 - Apr 13th, 2010, 6:40am
 
The output of println() shows up in the blackbox below the text editor, not in the drawing window. Are you sure you're expecting for it at the right place?
Re: Noob can't get println to do anything
Reply #3 - Apr 13th, 2010, 6:45am
 
Good remark Lie Ryan!
The "grey square" is probably the default sketch area (I thought about "unknown font" symptom instead).

Yes, println is to dump debug information on the console, below the text editor, in a persistent way (ie. you can scroll back, etc. but you loose that when restarting the sketch).
To show text on the sketch area, use the text() function (and load font first).
Re: Noob can't get println to do anything
Reply #4 - Apr 13th, 2010, 7:31am
 
Doh!  I was indeed looking for it in the wrong place.  Thank you very much.
Page Index Toggle Pages: 1