RosettaCodeData/Task/Logical-operations/Metafont/logical-operations-1.metafont
2023-07-01 13:44:08 -04: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;