Re: Good C programming style



On 2005-10-10 15:31:40 +0200, Chris Dollin <kers@xxxxxxxxxx> said:

Sensei wrote:

So why I see so often something like:

#define CEXCERPT do { \
some(); \
C_code(); \
here(); \
} while(0)

Is it just some person thinking he would achieve more speed?

No, it's some person arranging that their macro can be expanded as CEXCERPT;

without confusion. (I would have thought, even more likely
with a parameterised macro.)


I understood why he does not use a ; at the end, but why someone would have such a big macro... is beyond my knowledge, something like the xge_whatever stuff I found... :)

--
Sensei <senseiwa@xxxxxxx>

The difference between stupidity and genius is that genius has its limits. (A. Einstein)

.



Relevant Pages

  • Re: Godels Incompleteness theorem
    ... Childish. ... Give the correct definition then, genius! ... It also has the tendency to make people's head swim in confusion. ...
    (sci.math)
  • Re: Good C programming style
    ... Chris Dollin wrote: ... without confusion. ... with a parameterised macro.) ... mill, Size n) { ...
    (comp.lang.c)