No bug, just plain C. I guess we should both be ashamed, because I do the same type of thing. Not because performance is any better, as compilers pretty much do what they want these days, but because it simply speaks to me.
It can be faster to write and easier to read, but only to those who think in the language. I began my career enamored with the possiblilty of writing entire routines on a single line. I still prefer it, because I despise having to search pages of comments and white space to find that one fragment of code. Others, however, will have trouble with it. It doesn't 'speak' to them. I've known some who would snicker and move on, but others who would demand I be burned at the stake! For their peace of mind I try to avoid the abuse of coding tricks. But, when I get into one of my moods, this coding style can serve as a release, and it can be vicious :) -------------------- Jeff Loucks Work 425-284-1128 [EMAIL PROTECTED] Home 253-851-8908 [EMAIL PROTECTED] Mobile 253-691-8812 -----Original Message----- From: Logan Shaw [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 12:15 PM To: Palm Developer Forum Subject: Re: Difference between NULL and 0? Jeffry Loucks wrote: > Okay, the curmudgeon's gotta speak. > Anybody want to talk about true and false? Well, not exactly. But I have a question: I recently wrote a set of fixed-point math functions (24 to the left and 8 to the right) and defined ceil(a) as (a >> 8) + !!(a & 0xff). So my question is, should I be ashamed of myself? If it affects the answer, my motivation was speed and not obfuscation, and I put a comment explaining what it does. - Logan (And if there's a bug with that, somebody tell me...) -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/