18 lines
706 B
Text
18 lines
706 B
Text
Method "logic ops_,_" is
|
||
[
|
||
a : boolean;
|
||
b : boolean;
|
||
|
|
||
Print: "not a: " ++ “¬a”;
|
||
Print: "not b: " ++ “¬b”;
|
||
Print: "a and b: " ++ “a ∧ b”;
|
||
Print: "a or b: " ++ “a ∨ b”;
|
||
Print: "a nand b: " ++ “a ↑ b”;
|
||
Print: "a nor b: " ++ “a ↓ b”;
|
||
Print: "a implies b: " ++ “a → b”; // = not a OR b
|
||
Print: "a is implied b b: " ++ “a ← b”; // = a OR not b
|
||
Print: "a does not imply b: " ++ “a ↛ b”; // = a AND not b
|
||
Print: "a is not implied by b: " ++ “a ↚ b”; // not a AND b
|
||
Print: "a xor b: " ++ “a ⊕ b”; // equivalent to a ≠ b
|
||
Print: "a biconditional b: " ++ “a ↔ b”; // equivalent to a = b
|
||
];
|