RosettaCodeData/Task/Ternary-logic/Tcl/ternary-logic-2.tcl
2023-07-01 13:44:08 -04:00

10 lines
278 B
Tcl

namespace import ternary::*
puts "x /\\ y == x \\/ y"
puts " x | y || result"
puts "-------+-------++--------"
foreach x {true maybe false} {
foreach y {true maybe false} {
set z [equiv [and $x $y] [or $x $y]]
puts [format " %-5s | %-5s || %-5s" $x $y $z]
}
}