Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeConcepts
Boolean

Boolean

A Boolean value is a truth value and can be used as a condition.

Related concepts:  ValueTypeConditional

Closest Wikipedia entry:  Boolean data type

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Boolean is based on principled authoritative sources such as:

nLab - Section Boolean algebra

Misconceptions about Boolean
13 documented Misconceptions

Any LanguageJavaJavaScriptPythonScratch
Check Yourself
Misconception
ComparisonWithBooleanLiteral
To test whether an expression is true or false, one must compare it to true or to false
Misconception
MapToBooleanWithConditionalOperator
To map a boolean expression to a boolean, a conditional operator is necessary
Misconception
MapToBooleanWithIf
To map a boolean expression to a boolean, an if statement is necessary
Misconception
NoShortCircuit
&& and || always evaluate both operands
Misconception
NoSingleLogicAnd
& is only a bitwise AND
Misconception
NumericToBooleanCoercion
Numeric types can be coerced to boolean
Misconception
ReferenceToBooleanCoercion
Every reference type can be coerced to boolean

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors