Boolean Operators
This topic describes the support for Boolean operators in F#.
Summary of Boolean Operators
The following table summarizes the Boolean operators that are available in F#. The only type supported by these operators is the bool
type.
Operator | Description |
---|---|
not |
Boolean negation |
|| |
Boolean OR |
&& |
Boolean AND |
The Boolean AND and OR operators perform short-circuit evaluation, that is, they evaluate the expression on the right of the operator only when it is necessary to determine the overall result of the expression. The second expression of the &&
operator is evaluated only if the first expression evaluates to true
; the second expression of the ||
operator is evaluated only if the first expression evaluates to false
.
See also
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