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

Welcome to IWETHEY!

New Ain't that a UL
My See is awful rusty.
New This is why C is sometimes called "high-level assembler."
Although I enjoyed using C to poke around inside MS-DOS and Windows, nowadays I prefer more modern languages. With things like Big Integers. :-)

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

New Re: This is why C is sometimes called "high-level assembler.
C is basically the lingua franca for embedded these days (although C++ is starting to make inroads there, much to Todd's chagrin ;-) )
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Actually, that would be a U (or u)
The 'L' or 'l' means long and implicitly signed. Note, however, that
\nint main (int argc, char ** argv)\n{\n    assert(MAX(0x7FFFFFFFL, 0x80000000L) == 0x7FFFFFFFL);\n    return 0;\n}\n\n

also asserts. And while LordBeatnik's respone below makes sense and probably explains my original bitch, it certainly doesn't explain the above.

<mumble>
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New What about casting the values?
something like:
\n   assert(MAX((long)0x7FFFFFFF, (long)0x80000000) == (long)0x7FFFFFFF);\n
New Yes, that was the solution I used
This seems to be the best solution; it gives me the explicit bit pattern I'm looking for, and the explicit instruction to treat the patters as signed. Hopefully, when the first draft of the C++0x spec comes out, they will have cleaned up the spec with regards to this particular issue.
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

     What is with gcc, anyway?!? - (jb4) - (52)
         What is typeof(0x80000000)? - (ChrisR) - (7)
             right, add an L -NT - (deSitter) - (6)
                 Ain't that a UL - (ChrisR) - (5)
                     This is why C is sometimes called "high-level assembler." - (static) - (1)
                         Re: This is why C is sometimes called "high-level assembler. - (jb4)
                     Actually, that would be a U (or u) - (jb4) - (2)
                         What about casting the values? - (ChrisR) - (1)
                             Yes, that was the solution I used - (jb4)
         Re: What is with gcc, anyway?!? - (lordbeatnik) - (3)
             I guess... - (jb4) - (2)
                 If there was no ambiguity... - (lordbeatnik) - (1)
                     For the next set of standards? - (jb4)
         Hex constants are assumed to be positive - (Arkadiy) - (36)
             Re: Hex constants are assumed to be positive - (jb4) - (35)
                 Setting the high bit is processor dependent. - (hnick) - (34)
                     OK, then the standard should be saying - (Arkadiy) - (33)
                         No I actually write code based on them - (jb4) - (30)
                             Ignore them and use my common sence -NT - (Arkadiy) - (29)
                                 I'll bet debugging your code is a real joy... - (jb4) - (28)
                                     Nope - (Arkadiy) - (27)
                                         And so tell me, O Oracle of Common Sence [sic] - (jb4) - (26)
                                             offensive foul, ball to Ark - (deSitter) - (3)
                                                 Rest assured, - (Arkadiy) - (1)
                                                     :) ok -NT - (deSitter)
                                                 OK, OK... - (jb4)
                                             Well, while the tone is disagreable, the question is - (Arkadiy) - (21)
                                                 Point missed. - (jb4) - (20)
                                                     If C were sane, TRUE = -1 and problem vanishes -NT - (deSitter) - (7)
                                                         Ermm...say What? - (jb4) - (2)
                                                             Re: Ermm...say What? - (deSitter) - (1)
                                                                 Much like Jewish law - (Arkadiy)
                                                         So you prefer how VB does it?? -NT - (ben_tilly) - (3)
                                                             Point: Ben... -NT - (jb4)
                                                             How it used to do it. - (ChrisR) - (1)
                                                                 Hehee! - (jb4)
                                                     Why do you expect hex to be treated differently from decimal - (Arkadiy) - (11)
                                                         Re: Why do you expect hex to be treated differently - (deSitter)
                                                         Man, that's a good question! - (jb4)
                                                         Now that's clarity! -NT - (a6l6e6x) - (8)
                                                             Nope, it's bad math - (deSitter) - (7)
                                                                 But, counters of real things don't need negative values. -NT - (a6l6e6x) - (6)
                                                                     I'd like to add a negative number of votes for Bush. ;-) -NT - (ben_tilly) - (1)
                                                                         That only works on Diebold machines. :) -NT - (a6l6e6x)
                                                                     Certainly - (deSitter) - (3)
                                                                         "Expressive", not "pithy" :) - (Arkadiy) - (2)
                                                                             Re: "Expressive", not "pithy" :) - (deSitter) - (1)
                                                                                 Dunno. - (Arkadiy)
                         Wasn't trying to piss you off... - (hnick) - (1)
                             Interesting assumption: - (jb4)
         Hmm...while the datatype will be first reached, - (Simon_Jester) - (1)
             True, but... - (jb4)
         Re: What is with gcc, anyway?!? - (gdaustin)

Shocking, but not surprising.
126 ms