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  

|| (logical OR)

   
Examples  
for(int i=5 ; i<=95; i+=5) { 
  if((i < 35) || (i > 60)) { 
    line(30, i, 80, i); 
  } 
} 
Description   Compares two expressions and returns true if one or both evaluate to true. Returns false only if both expressions are false. The following list shows all possible combinations:

true || false // Evaluates true because the first is true
false || true // Evaluates true because the second is true
true || true // Evaluates true because both are true
false || false // Evaluates false because both are false
   
Syntax  
expression1 || expression2
   
Parameters  
expression1   any valid expression

expression2   any valid expression

   
Usage   Web & Application
   
Related   && (logical AND)
! (logical NOT)
if()
 
 






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








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