C
Cor
Tony,
You are right, when you are here I give you a nice Heineken.
Cor
You are right, when you are here I give you a nice Heineken.
Cor
True is usually -1, because Booleans are usually signed and true is
All Bits On (using two's complement we end up with -1). All bits off,
obviously, is 0. => False.
Cor said:I am Dutch, I think you did know that already.
You know we deal very easy with the English language
because our language is quiet simular with that language
even more than German.
But English, German and Duch are languages from the North
sea and quiet simular(for who did not know that).
I find it strange that you wrote that program sentences
are abstracts for you and in the same way wrote they
are natural.
(I think it is abstract for most German people, that is
normal because German is the major language in
Europe, but not for you).
But we agree and I have to say that my discussion is strange.
We both like VB.net because it is so natural (I hated VB till
there was VB.net, I did find the not anymore usable Cobol
the best till now), and on the other hand I want a language
independent program language.
Cor said:You are right, when you are here I give you a nice
Heineken.
I would suggest that there is no justification for True to be defined
as 1. It should always be -1 since the definition of True is
Tom Spink said:True
Why should it give a one? A = B = 3 is "A becomes equal to the comparison of
(B = 3)". B = 3, in this instance, results in a boolean expression.
True is usually -1, because Booleans are usually signed and true is All Bits
On (using two's complement we end up with -1). All bits off, obviously, is
0. => False.
Chris Dunaway said:...
This may be true of the language, but in my opinion, it is poor coding
practice to use a boolean state and an integer value. The two should not
be mixed.
Tom Shelton said:...
First, I totally agree with the respondent Chris, that boolean values should
never be treated as integers... But beyond that - VB was the only language
I ever used that defined true = -1 and false = 0. Most languages define it
as true <> 0, false = 0. Of course most if you do an integer conversion
define the actual value of true as 1.