Ternary logic: Difference between revisions

Removed useless declaration od "op1" and "op2". Added "when isMainModule:".
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
(Removed useless declaration od "op1" and "op2". Added "when isMainModule:".)
Line 3,323:
t[a][b]
 
import strutils
 
when isMainModule:
var
 
op1 = ttrue
import strutils
op2 = ttrue
 
for t in Trit:
echo "Not ", t , ": ", not t
 
for op1 in Trit:
for op2 in Trit:
echo "$# and $#: $#".format(op1, op2, op1 and op2)
echo "$# or $#: $#".format(op1, op2, op1 or op2)
echo "$# then $#: $#".format(op1, op2, op1.then op2)
echo "$# equiv $#: $#".format(op1, op2, op1.equiv op2)</lang>
{{out}}
<pre>Not T: F
Anonymous user