Rexx-logical-operators

提供:Dev Guides
2020年6月23日 (火) 01:03時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

Rexx-論理演算子

論理演算子は、ブール式を評価するために使用されます。 以下は、Rexxで使用可能な論理演算子です。

Operator Description Example
& This is the logical “and” operator 1 or 1 will give 1
This is the logical “or” operator
1 or 0 will give 1 \ This is the logical “not” operator
\0 will give 1 && This is the logical exclusive “or” operator

次のプログラムは、さまざまな演算子の使用方法を示しています。

/* Main program*/
say 1 & 0
say 1 | 0
say 1 && 0
say \1

上記のプログラムの出力は次のようになります-

0
1
1
0