Bool keyword?

Started by
11 comments, last by jcdenton999 20 years, 8 months ago
The variable itself has been named After George Boole who duscivered true and false statements through the law of contradiction. Boolean variable means that it can have either two values, true or false, but in computer arithmetic these are intrepeded as 0 and 1 due to simplicity.


The rule of contradiction:
x^2 = x

"Nothing can''t at the same time belong and not belong to given class x", which is basically a rephrase of aristotle''s rule of contradiction in mathematical form.
Advertisement
Ok, my bad, sorry for the confusion. See, it is places like this that make us remember the little things. A lot of times I use < 0 as my invalid statement because 0 would be valid for my purposes. Just goes to show how not to open your mouth unless your ready to taste feet.
int main(){	bool bBool = (bool)-1;	if ( !(bBool) )	    printf( "!(bBool) = true\n\r" );	if ( !(-1) )	    printf( "!(-1) = true;\n\r" );	if ( bBool )	    printf( "(bBool) = true\n\r" );	if ( (-1) )		printf( "(-1) = true\n\r" );	return getch();}
Evillive2
Well, Boole''s logic is somewhat old when related to computer science. In fact it is much better to use 32bit int in every single way.

You can perform the same exact operations as with "bools".
A bool is not considered to be a class of anything.
You are not limited to two possible answers with ints.
You can perform much complicated logic with integers(not in C/C++, because the language has been dummed like that.)
Frege''s s-expressions have been considered much better ever since they were first implemented.



And some 1337 d00ds will probably bring up the point D00D 32 BIT INT IS SO FAAST D000D U''ll GAIN 1FPS D00D

This topic is closed to new replies.

Advertisement