Logical operations: Difference between revisions

no edit summary
No edit summary
Line 1,361:
--end
</syntaxhighlight>
 
=={{header|EMal}}==
<syntaxhighlight lang="emal">
fun logicOperations = void by logic a, logic b
writeLine("=== input values are " + a + ", " + b + " ===")
writeLine("a and b: " + (a and b))
writeLine(" a or b: " + (a or b))
writeLine(" not a: " + (not a))
end
logicOperations(false, false)
logicOperations(false, true)
logicOperations(true, false)
logicOperations(true, true)
</syntaxhighlight>
{{out}}
<pre>
=== input values are ⊥, ⊥ ===
a and b: ⊥
a or b: ⊥
not a: ⊤
=== input values are ⊥, ⊤ ===
a and b: ⊥
a or b: ⊤
not a: ⊤
=== input values are ⊤, ⊥ ===
a and b: ⊥
a or b: ⊤
not a: ⊥
=== input values are ⊤, ⊤ ===
a and b: ⊤
a or b: ⊤
not a: ⊥
</pre>
 
=={{header|Erlang}}==
226

edits