Boolean or Bool
Description
True or False
Represented also as 1 (true) or 0 (false)
Whether it’s capitalized depends on the language
Great for control and sensors
Examples:
Processing:
C#
JavaScript
Python:
Shortcut
Using an exclamation mark ( ! ) at the beginning of a boolean variable name is short for “the opposite” of the variable
This does not update the variable.
Examples:
Processing and Java-based example:
C# example:
This "shortcut" might not exist in Python.
Last updated
Was this helpful?