Re: Odd dog days & Vets




"Charles Francis" <charles@xxxxxxxxxxxxxxxx> wrote in message
news:3JBuduCBiFsDFwAA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 1 is true, 0 is false. I am a not little rusty. As I recall sometimes
> truth is determined by the last bit of byte, in which case any odd
> number would evaluate as true, and any odd number as false, but I think
> I generally worked in languages, or chips, in which any nonzero number
> evaluated as true.
>


It is generally bad programming to use or assume the underlying
representation of values.

Better to use only 'TRUE' and 'FALSE' in all the algorithms. I would not
trust the compiler to pack booleans to single bits.
It is probably true that FALSE == 0 and TRUE is > 0.

I would (in c) use:

#define TRUE 1
#define FALSE 0

if I wanted to be sure of the representation.




.



Relevant Pages

  • Re: Odd dog days & Vets
    ... I am a not little rusty. ... As I recall sometimes ... truth is determined by the last bit of byte, ... number would evaluate as true, and any odd number as false, but I think ...
    (uk.business.agriculture)
  • Re: In what language do you think?
    ... In fact, photons are as real as molecules, and a distinction between ... representation; hence I doubt whether our sensual organs are involved ... recall some picture, music or odor, I neither see nor hear or smell. ...
    (sci.lang)
  • Machine code for farmers who want their heads to spin.
    ... As I recall sometimes ... > if I wanted to be sure of the representation. ... completely unfit for any form of commercial programming. ... machine code. ...
    (uk.business.agriculture)
  • Re: five reasons why mathematics ends in meaninglessness
    ... It's evident that byron intends the decimal reals, ... I understood originally the distinction that byron was making, ... byron means 1 to be a finite representation and .99to be ... I tend to write them down as truth and Truth, ...
    (sci.math)
  • Re: An uncountable countable set
    ... Cantor's argument was about reals. ... But reals are not tied to their representation. ... Therefore a general truth should not depend on the base 4 or larger. ... A specific proof of a general truth can be based on whatever it is based on. ...
    (sci.math)