Re: 'Unknown' and three-valued logic (was: Example where Euphoria ...)
- Posted by dm31 at uow.edu.au Nov 25, 2002
- 453 views
|C intially chose to represent a int by 16 bits, with first bit as |sign-bit. They could have reserved one bit as nil-bit (nil-flag), |meaning a int would have been in the range +/- 16384. And Programmers, like me, would not be very happy with our range oin each data type been halved for a flag that we would RARELY use. I have no problem with values not been initialised, as it is part of programming. A little care saves a lot of debug time, and the times that your nil, would be vital would be rare, considering the software available so far today. Implementing a 3-state software architechure on a 2 state system is the most effiecent idea. I'm not saying 3-state logic would be useless, far from it. Just wonder how the pro's and con's weight up in natively supporting it on a 2-state machine.... Creating a package would be the best way to go, like the c++ code you got from me Rom, when using it, you basically use it like it was a native type. Oh, btw, you can't call 3-state logic "boolean" 2 <=> 3... :P:P