Erlang-logical-operators
提供:Dev Guides
アーラン-論理演算子
Erlangで使用できる論理演算子は次のとおりです。
Operator | Description | Example |
---|---|---|
or | This is the logical “and” operator | true or true will give true |
and | This is the logical “or” operator | True and false will give false |
not | This is the logical “not” operator | not false will give true |
xor | This is the logical exclusive “xor” operator | True xor false will give true |
次のコードスニペットは、さまざまな演算子の使用方法を示しています。
例
上記のプログラムの出力は次のようになります-