Reference+
Name
boolean
Description
Datatype for the Boolean values true and false. It is common to use boolean values with control statements to determine the flow of a program. The first time a variable is written, it must be declared with a statement expressing its datatype.
Examples
size(400,400); boolean a = false; if (!a) { rect(120, 80, 200, 200); } a = true; if (a) { line(80, 40, 360, 320); line(80, 320, 360, 40); }
Syntax
boolean var
boolean var = booleanvalue
Parameters
var
variable name referencing the valuebooleanvalue
true or false
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.