IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: NOT boolean - this is C
I always considered that a good thing, but C gets it wrong too - to me, TRUE should be -1 which is really 0xFFFFFFFF and FALSE is NOT TRUE, which is "turn off all bits in TRUE", which is 0x00000000. I don't understand why this was never standardized. This way there is ONLY one value of both TRUE and FALSE, so you can say NOT TRUE as well as NOT FALSE unambiguously. I always hated the Boolean type but the C way is just as bad.

Note that in an untyped language it makes more sense to have TRUE and FALSE as 1 and 0.

-drl
New Nah, put on your binary thinking cap. :)
Only the value zero gets special treatment at the machine instruction level. You either have it or you don't. You can branch on it. Anything else requires a comparison first. Besides, you're leaving a rather large gray area between 0x0 and 0xFFFFFFFF that now needs some kind of handling.
Alex

"Don't let it end like this. Tell them I said something." -- last words of Pancho Villa (1877-1923)
     I'm having a problem grokking C - (jake123) - (61)
         "\\0" is a string - not a character - (ChrisR) - (54)
             Re: "\\0" is a string - not a character - (jake123) - (23)
                 Double quotes is a string: - (ChrisR)
                 You want to use '0' not "0". - (a6l6e6x) - (21)
                     Thanks guys - (jake123) - (20)
                         sheesh, wackiness - (jake123) - (17)
                             operator precedence -NT - (deSitter) - (3)
                                 According to my text - (jake123) - (2)
                                     use "unsigned char" - (deSitter)
                                     Re: According to my text - (Arkadiy)
                             Should be equivalent indeed - (Arkadiy) - (12)
                                 Well, interestingly enough - (jake123) - (11)
                                     Re: Well, interestingly enough - (Arkadiy) - (10)
                                         Yes, I was sure. -NT - (jake123) - (9)
                                             copy/paste the full code, then -NT - (Arkadiy) - (8)
                                                 Sure, here's my final version - (jake123) - (7)
                                                     Works with or without parens for me - (Arkadiy) - (4)
                                                         Feel free - (jake123) - (3)
                                                             Re: Feel free - (Arkadiy) - (2)
                                                                 You're suggesting that - (jake123) - (1)
                                                                     Basically, yes - (Arkadiy)
                                                     Works here too, both ways. gcc 3.3.2 -NT - (scoenye) - (1)
                                                         It is working here - (jake123)
                         What is the type of 'value1' ? - (jb4) - (1)
                             Nah, it's an int - (jake123)
             NOT better! - (jb4) - (29)
                 Think we've had this argument before - (ChrisR)
                 Agreed -NT - (deSitter)
                 NOT boolean - this is C - (tuberculosis) - (25)
                     Re: NOT boolean - this is C - (deSitter) - (1)
                         Nah, put on your binary thinking cap. :) - (a6l6e6x)
                     Yes, yes...agreed - (jb4) - (22)
                         Breaking bad habits - (ChrisR) - (21)
                             Good points... - (jb4) - (15)
                                 Not that I do a tremendous amount of C programming... - (admin) - (4)
                                     K&R - (ChrisR)
                                     My mileage varies. :-) - (static)
                                     They are all ugly - (tuberculosis) - (1)
                                         Yep. - (admin)
                                 The business seems to have plenty of time on its hands - (ChrisR) - (9)
                                     Disagree with several of your premises - (jb4) - (8)
                                         Dude - (tuberculosis) - (7)
                                             Which reminds me - C++ is why our hardware sucks (new thread) - (tuberculosis)
                                             rofl - (deSitter)
                                             Heh - (jake123)
                                             Dude... - (jb4) - (3)
                                                 Whoa, JB gets feisty! - (deSitter)
                                                 Non-sequitur - (tuberculosis) - (1)
                                                     OK, then apology accepted........;-) - (jb4)
                             I'd have to agree - (jake123) - (4)
                                 Used to be a Fortran thing - (ChrisR) - (3)
                                     Re: Used to be a Fortran thing - (deSitter) - (2)
                                         Yep -FORTRAN for math libs rulez - (tuberculosis) - (1)
                                             Re: Yep -FORTRAN for math libs rulez - (deSitter)
                 Misra C guidelines - (ChrisR)
         Ob-C advice - (deSitter)
         Stylistic tip - (ben_tilly)
         Re: I'm having a problem grokking C - (tuberculosis) - (3)
             Hehehe - (jake123) - (2)
                 int isdigit(int c) { return (c >='0' && c <= '9'); } - (tuberculosis) - (1)
                     :) - (jake123)

It's not rocket surgery!
142 ms