Macro still floating above my head

Discussion in 'C Programming' started by janus, Feb 25, 2012.

  1. janus

    janus Guest

    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
    janus, Feb 25, 2012
    #1
    1. Advertising

  2. janus

    Eric Sosman Guest

    On 2/25/2012 11:02 AM, janus wrote:
    > 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.

    --
    Eric Sosman
    d
    Eric Sosman, Feb 25, 2012
    #2
    1. Advertising

  3. 在 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.
    88888 Dihedral, Feb 25, 2012
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian W
    Replies:
    10
    Views:
    750
    Brian W
    Jul 2, 2003
  2. showme

    PHP and ASP.NET go HEAD to HEAD

    showme, Jul 8, 2004, in forum: ASP .Net
    Replies:
    13
    Views:
    709
    Sherif ElMetainy
    Jul 10, 2004
  3. Karl
    Replies:
    0
    Views:
    383
  4. Jiho Han

    Write into <HEAD></HEAD> section?

    Jiho Han, Jan 14, 2004, in forum: ASP .Net Building Controls
    Replies:
    6
    Views:
    218
    Sam Fields
    Jan 16, 2004
  5. teeshift
    Replies:
    2
    Views:
    241
    Chris Pearl
    Dec 1, 2006
Loading...

Share This Page