4 ms·
What about Microsoft's own "MsoTrioState"? https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.core.msotristate?view=office-pia https://learn.microsof
by t-writescode 5mo ago
What about Microsoft's own "MsoTrioState"?
https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.core.msotristate?view=office-pia https://learn.microsoft.com/en-us/dotnet/api/microsoft.offic...
enom MsoTrioState {
Toggle,
Mixed,
True,
False,
CTrue
};
- 8n4vidtmkvmk 5mo agoIs it called "trio" state because 3 of the 5 states are not supported? I also like how True is -1. Beautiful all around!
- saidnooneever 5mo agonote CTrue, the one true true
- biglyburrito 5mo agoCTRUE IS A FALSE PROPHET AND ITS WORSHIPPERS SHALL BURN FOR THEIR HERESY
- orthoxerox 5mo ago-1 means every single bit is 1, the truest possible value.
- nkrisc 5mo agoI’m having a surprisingly difficult time deciding if I strongly agree or disagree with this statement.
- orthoxerox 5mo agoI know VB used -1 as the truth value, not sure about other languages.
- deleted 5mo ago[deleted]
- dale_glass 4mo agoApparently it's sort of sensible, but weird. msoTriStateMixed applies to aggregates. Eg, text.isBold() can be true, false, or a mix. Partly bold, partly not bold. msoTriStateToggle isn't a real value but only used as a sort of flag. So eg, text.setBold(tristate), where "Mixed" would be invalid, and "Toggle" would flip the bold-ness of the text. The msoCTrue one is where it gets really weird, no clue what's that for. I suppose an ill-conceived attempt to support the other way to express True. True being -1 was a thing in Visual Basic and I suppose by some other Windows stuff. Logic being all the bits are 1.
- drdaeman 5mo agoUsual reminder that one of the hardest problems in software engineering is still naming things ;-)
- biglyburrito 5mo agoMore languages need to support enoms.