Re: When shorts are longer than longs !



Richard Heathfield wrote:
Before I present the code

... you should retract the claim that you've been programming in
C for around 20 years.

Heathfield's C style: Go to torturous lengths to make it look as if
you know what you're doing when it comes to autistic-level ISO C
Portable Programming (tm) while leaving enough blunderous *** in your
code to negate any gains you've made along the way.

I should warn you that I have a tenth of
a millirecollection that, the last time I posted this code, some
bright spark suggested an obvious improvement that I don't think I
ever got around to incorporating - and I can't now remember what
that improvement was. Anyway, the code works as written (modulo
crits from bright people, obviously)

You're a joke, Heathfield. It's disturbing to watch you and Falconer
pat yourselves on the back for the most trivial crap that everyone
has written.

"Before I present the code..." *drum roll* "...I should warn you
that I have a tenth of a millirecollection that, the last time
I posted this code..." *suspense gong* "...some bright spark
suggested an obvious improvement..." (not obvious for some)
"... that I don't think I ever got around to incorporating..."
(Heathfield talks it up like a kernel hacker pondering a
patch or something) "...and I can't now remember what that improvement
was. Anyway, the code works as written..." (so without further ado...)

---------------------------------------------------------------------------
/*
* adder.c
*
* This program is a strictly conforming C program.
* Both C90 and C99 implementations are supported.
* Before using this code on your particular implementation,
* you may wish to consult your documentation to find out
* how to place your translator into conforming mode.
* Note that some translators may have extensions that
* conflict with the use of this code. You've been warned.
* Please contact me via email with any comments, suggestions,
* or feature requests.
*
* Before I present the code, I'd like to take a moment to
* thank the guys over at comp.lang.c for presenting me
* with a streamlined approach to the algorithm. Any
* bugs in this code are mine, not theirs.
*
* Richard Heathfield
*
*/

int main(void)
{
int n1 = 1, n2 = 2;
n1 += n2;
return 0;
}

---------------------------------------------------------------------------

Yours,
Han from China

--
"Only entropy comes easy." -- Anton Chekhov

.


Quantcast