The bool data type
The bool
data type can be: true
(1
), false
(0
), or null.
The
bool
andboolean
data types are equivalent.
bool
literals
To specify a bool literal, use one of the following syntax options:
Syntax | Description |
---|---|
true or bool(true) |
Represents trueness. |
false or bool(false) |
Represents falsehood. |
bool(null) |
Represents the null value. |
Learn more about syntax conventions.
Boolean operators
The bool
data type supports all of the logical operators: equality (==
), inequality (!=
), logical-and (and
), and logical-or (or
).
Related content
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for