FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   print()?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: print()?  (Read 859 times)
michael

Email
print()?
« on: Dec 11th, 2002, 7:02pm »

print() won't work for me. it just prints nothing. both in the IDE and when exported to a web page.  
 
printIn() returns the error: Cannot find method "printIn(java.lang.String)"
 
i wouldn't surprised one bit if it were something i was doing. i don't know much about java.
 

In the beginning, the universe was created. This made a lot of people very angry, and has been widely regarded as a bad idea.

-- Douglas Adams in The Hitchhiker's Guide to the Universe.
fry


WWW
Re: print()?
« Reply #1 on: Jan 2nd, 2003, 6:02pm »

are you on mac or pc? which rev of p5 are you using?
 
printIn should be println, short for "Print Line"
 
also what are you trying to print?
 
Martin

122417302122417302martingomez_listsmg1ph WWW Email
Re: print()?
« Reply #2 on: Jan 5th, 2003, 7:18am »

yup. print() has a bug on 0046 as reported by mike davis. go around this by following print() with println(). applet won't return anything unless you have a console window.
 
fry


WWW
Re: print()?
« Reply #3 on: Jan 5th, 2003, 6:25pm »

hm, all it's doing in this case is calling java's System.out.println and System.out.print..  
 
print() style functions in most apps/apis/languages generally don't show their output right away unless the buffer is flushed. a new line (or some higher number of characters) most often flushes the buffer, forcing the output to be updated. this is because flushing on every print() tends to be very slow.  
 
that said, i think it may make sense to flush on print() for p5, since print() is really only used as a debugging tool (speed not an issue) and it makes more sense for it to behave 'as expected' (flushing/updating every time) than to make people learn this bit of trivia just to get messages printing to the console. if you guys were thrown off by it, it's more than likely that some other folks will be too.
 
thanks for the report..
 
Pages: 1 

« Previous topic | Next topic »