Fsharp-boolean-operators
提供:Dev Guides
F#-ブール演算子
次の表は、F#言語でサポートされているすべてのブール演算子を示しています。 変数Aが true を保持し、変数Bが false を保持すると仮定します-
Operator | Description | Example |
---|---|---|
&& | Called Boolean AND operator. If both the operands are non-zero, then condition becomes true. | (A && B) is false. |
Called Boolean OR Operator. If any of the two operands is non-zero, then condition becomes true. | (A | |
B) is true. | not | Called Boolean NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false. |
例
あなたがプログラムをコンパイルして実行すると、次の出力が得られます-