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  

boolean()

   
Examples  
float f = 0.0; 
boolean b = boolean(f); 
println(f + " : " + b);  // Prints "0.0 : false" 
 
int i = 1; 
b = boolean(i); 
println(i + " : " + b);  // Prints "1 : true" 
 
i = 3445; 
b = boolean(i); 
println(i + " : " + b);  // Prints "3445 : true" 

Description   Converts a primitive datatype, string, or array to its boolean representation. The number 0 evaluates to false and all other numbers evaluate to true.
   
Syntax  
boolean(val)
   
Parameters  
val   int, float, char, byte, String, int[], float[], char[], byte[], String[]

   
Returns   boolean
   
Usage   Web & Application
   
Related   boolean
 
 






   
 
Updated: Fri Jul 15 16:35:33 PDT 2005
 
 








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