Name

true

Description

Reserved word representing the logical value "true". Only variables of type boolean may be assigned the value true.

Examples

  • rect(30, 20, 50, 50);
    boolean b = true;
    if (b == true) {
      line(20, 10, 90, 80);  // This line is drawn
    } else {
      line(20, 80, 90, 10);  // This line is not drawn
    }