Macro still floating above my head

J

janus

Hello All,

I would need some to explain the below code.
#define RF_ARG16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) _15

I understand "..." as variable arguments. But what is "_x"?

Regards, \Janus
 
E

Eric Sosman

Hello All,

I would need some to explain the below code.
#define RF_ARG16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) _15

I understand "..." as variable arguments. But what is "_x"?

A name for a macro parameter. The macro is equivalent to

#define RF_ARG16(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, \
p10, p11, p12, p13, p14, p15, ...) p15

or to

#define RF_ARG16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,...) p

In any guise, it looks like a symptom of macro overreach if
not outright macro abuse.
 
8

88888 Dihedral

在 2012å¹´2月26日星期日UTC+8上åˆ12æ—¶02分47秒,janus写é“:
Hello All,

I would need some to explain the below code.
#define RF_ARG16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) _15

I understand "..." as variable arguments. But what is "_x"?

Regards, \Janus



在 2012å¹´2月26日星期日UTC+8上åˆ12æ—¶02分47秒,janus写é“:
Hello All,

I would need some to explain the below code.
#define RF_ARG16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) _15

I understand "..." as variable arguments. But what is "_x"?

Regards, \Janus

If the variaied number of arguments in a function somewhat like printf called everywhere, then the stack has to be used a lot.

I never call printf with more then 4 variables to show messages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top