RosettaCodeData/Task/Ternary-logic/Delphi/ternary-logic-3.delphi
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

22 lines
704 B
Text

const
tvl_not: array[TriBool] = (tbTrue, tbMaybe, tbFalse);
tvl_and: array[TriBool, TriBool] = (
(tbFalse, tbFalse, tbFalse),
(tbFalse, tbMaybe, tbMaybe),
(tbFalse, tbMaybe, tbTrue),
);
tvl_or: array[TriBool, TriBool] = (
(tbFalse, tbMaybe, tbTrue),
(tbMaybe, tbMaybe, tbTrue),
(tbTrue, tbTrue, tbTrue),
);
tvl_xor: array[TriBool, TriBool] = (
(tbFalse, tbMaybe, tbTrue),
(tbMaybe, tbMaybe, tbMaybe),
(tbTrue, tbMaybe, tbFalse),
);
tvl_eq: array[TriBool, TriBool] = (
(tbTrue, tbMaybe, tbFalse),
(tbMaybe, tbMaybe, tbMaybe),
(tbFalse, tbMaybe, tbTrue),
);