Click here to Skip to main content
13,626,876 members
Rate this:
Please Sign up or sign in to vote.
See more:
Well...False is 00000000 so true must be 11111111=-1 in decimal system(255 unsigned)
In all of the other programming languages I know
(not many) true is equal to -1 which makes more sense...
how can NOT(FALSE) be something else than NOT(00000000) ?
Thank you !!
Posted 6-May-14 8:32am
Maciej Los 6-May-14 14:53pm
Sample code would be appreciated.
Richard MacCutchan 6-May-14 15:14pm

To clarify: FALSE is defined as zero, and TRUE is defined as not zero, or in other words any non-zero value, or expression.
Wes Aday 6-May-14 15:14pm
Can you cite any reference to any programming language documentation where -1 evaluates to true?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The comparison operators ('>', '==', etc.) are defined to return a signed integer (int) result, either zero (for false) or 1 (for true)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.180712.1 | Last Updated 6 May 2014
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100