Home » F# Boolean Operators

F# Boolean Operators

by Online Tutorials Library

F# Boolean operators

Boolean operators are used to check conditional expressions. It returns true if expression satisfies the condition otherwise it returns false. In F#, and operator evaluates second operand if first operand is true otherwise it returns false without checking second operand. It is also known as short-circuit operator.

Symbol Description
Not Boolean negation
|| Boolean OR
&& Boolean AND

F# Boolean Operator Example

Output:

A and B both are equal Either A or B is 20 

You may also like