FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

print()

   
Examples  
print("begin- "); 
float f = 0.3; 
int i = 1024; 
print("f is " + f + " and i is " + 1024); 
String s = " -end"; 
println(s); 
 
// The above code prints: 
// begin- f is 0.3 and i is 1024 -end 


float[] f = { 0.3, 0.4, 0.5 }; 
print(f); 
 
// The above code prints: 
// 0.3 0.4 0.5 

Description   Writes to the console area of the Processing environment. This is often helpful for looking at the data a program is producing. The companion function println() works like print(), but creates a new line of text for each call to the function. Individual elements can be separated with quotes ("") and joined with the addition operator (+). Also writes the content of an array to the text area of the Processing environment's console. This is often helpful for looking at the data a program is producing. A space is put between each element of the array. This function can only print 1D arrays, but can test to see if the content are null or not null for 2+ dimensional arrays.
   
Syntax  
print(data)
   
Parameters  
data   boolean, byte, char, color, int, float, String, boolean[], byte[], char[], color[], int[], float[], String[]

   
Usage   IDE
   
Related   println()
 
 






   
 
Updated: Fri Jul 15 16:36:00 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info