12 lines
255 B
Text
12 lines
255 B
Text
# Logical operations, in LIL
|
|
set first [expr 1 == 1]
|
|
set second [expr 1 == 0]
|
|
|
|
func and-or-not {a b} {
|
|
print a $a b $b
|
|
print "a AND b" [expr $a && $b]
|
|
print "a OR b " [expr $a || $b]
|
|
print "NOT a " [expr !$a]
|
|
}
|
|
|
|
and-or-not $first $second
|