Boolean

From Wiring

Jump to: navigation, search


Name boolean
Description Datatype for boolean values true and false. It is common to use boolean values with control statements to determine the flow of a program. Internally the true value is represented by 1 and the false value is represented by 0.
Syntax
boolean var
Methods
Constructor
Parameters
var unknown datatype variable name referencing the value
booleanvalue unknown datatype true or false
Returns
Example
// declares a boolean variable and assigns the value 'true'
boolean firstTime = true;
 
// ...
 
if(firstTime == true) {
  // statements
}
Related
Language: English  • EspaƱol
Personal tools