Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Ian Collins <ian-news@hotmail.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: macro chain |
| Date | Wed, 14 Mar 2012 17:59:18 +1300 |
| Lines | 31 |
| Message-ID | <9samt6F8igU5@mid.individual.net> (permalink) |
| References | <b2008229-ce07-4b57-b337-640b422d2dda@a20g2000yql.googlegroups.com> <4f6024ec$0$1379$4fafbaef@reader2.news.tin.it> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net hepKQIJVKTKWBkgGhM4aKghkHtdUouwSp1MXY4ZWbOUq1mUEcj |
| Cancel-Lock | sha1:BPzJv9cFOMbJmZWXMGYDWkNnRQ4= |
| User-Agent | Mozilla/5.0 (X11; SunOS i86pc; rv:7.0.1) Gecko/20111228 Thunderbird/7.0.1 |
| In-Reply-To | <4f6024ec$0$1379$4fafbaef@reader2.news.tin.it> |
| Xref | csiph.com comp.lang.c:18744 |
Show key headers only | View raw
On 03/14/12 06:00 PM, io_x wrote: > "luser- -droog"<mijoryx@yahoo.com> ha scritto nel messaggio > news:b2008229-ce07-4b57-b337-640b422d2dda@a20g2000yql.googlegroups.com... >> I remember reading something from Knuth to the effect that you don't >> really need multiple argument macros because you can yield a macro >> name from the macro expansion and call that with a new argument. >> >> So I tried a little experiment: >> >> #define A(x) x + B >> #define B(y) y y y >> A(2)(3) >> >> And I'll be darned if gcc -E doesn't produce: >> >> 2 + 3 3 3 >> >> But I'm not really doing this right, am I? Does anyone have >> suggestions for where I could learn more? (more Knuth?) > > better not use C macro if not in these case: > #define whatIsThisNumber 89 > #define B 73 > #define u32 unsigned int > #define R return No! -- Ian Collins
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
macro chain luser- -droog <mijoryx@yahoo.com> - 2012-03-13 21:47 -0700
Re: macro chain "io_x" <a@b.c.invalid> - 2012-03-14 06:00 +0100
Re: macro chain Ian Collins <ian-news@hotmail.com> - 2012-03-14 17:59 +1300
Re: macro chain "io_x" <a@b.c.invalid> - 2012-03-14 06:25 +0100
Re: macro chain Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-03-14 12:54 +0000
Re: macro chain Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-03-14 09:05 -0400
Re: macro chain luser- -droog <mijoryx@yahoo.com> - 2012-03-14 08:56 -0700
csiph-web