RosettaCodeData/Task/Logical-operations/Phix/logical-operations-2.phix
2016-12-05 23:44:36 +01:00

10 lines
281 B
Text

function logiicop(integer a, integer b)
return {a, b, a and b, a or b, not a, a xor b, a=b, a!=b}
end function
printf(1," a b and or not xor = !=\n")
for a=0 to 1 do
for b=0 to 1 do
printf(1,"%2d %2d %d %d %d %d %d %d\n",logiicop(a,b))
end for
end for