Ternary logic: Difference between revisions

Content deleted Content added
→‎{{header|C}}: *THIS* is probably the intended order (I'd define FALSE to 0 but that's not cruical)
Line 422:
} trit;
 
const char* tritString[3] = {"FALSETRUE", "MAYBE", "TRUEFALSE"};
 
trit tritNot[3] = {TRITFALSE , TRITMAYBE, TRITTRUE};
Line 467:
 
Output:
<lang text>Not FALSETRUE: TRUEFALSE
Not MAYBE: MAYBE
Not TRUEFALSE: FALSETRUE
 
FALSETRUE AND FALSETRUE: FALSETRUE
FALSETRUE AND MAYBE: MAYBE
FALSETRUE AND TRUEFALSE: TRUEFALSE
MAYBE AND FALSE: MAYBE
MAYBE AND MAYBE: MAYBE
MAYBE AND TRUE: MAYBE
TRUEMAYBE AND FALSEMAYBE: TRUEMAYBE
TRUEMAYBE AND MAYBEFALSE: TRUEMAYBE
TRUEFALSE AND TRUE: TRUE</lang>FALSE
MAYBEFALSE AND MAYBE: MAYBEFALSE
MAYBEFALSE AND FALSE: MAYBEFALSE</lang>
 
=={{header|Java}}==