RosettaCodeData/Task/Logical-operations/Metafont/logical-operations-1.metafont
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

8 lines
227 B
Text

def tf(expr a) = if a: "true" else: "false" fi enddef;
def test(expr a, b) =
for o = "and", "or":
message tf(a) & " " & o & " " & tf(b);
show a scantokens(o) b;
endfor
message "not " & tf(a);
show not a enddef;