Preprocessor's question

Discussion in 'C Programming' started by ³á³á³á³á, Sep 12, 2003.

  1. #define f(a) a*g
    #define g(a) f(a)

    int
    main( void )
    {
    int i = f(2)(9);
    return 0;
    }

    i will be 2*f(9) ?

    or 2*9*g ?

    --
    |
     ___
    (-_-)
    <¡ä¡ä>¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w ªÅ´ßªª³õ shepjeng.twbbs.org ¢w¢w¢w
    ¡þ plum.cs.nccu.edu.tw
     
    ³á³á³á³á, Sep 12, 2003
    #1
    1. Advertising

  2. wrote:

    > #define f(a) a*g
    > #define g(a) f(a)
    >
    > int
    > main( void )
    > {
    > int i = f(2)(9);
    > return 0;
    > }
    >
    > i will be 2*f(9) ?
    >
    > or 2*9*g ?



    int main(void)
    {
    int i = 2*9*g;
    return 0;
    }


    --
    Martin Ambuhl
     
    Martin Ambuhl, Sep 12, 2003
    #2
    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. Dan W.
    Replies:
    9
    Views:
    332
    Paul Mensonides
    Dec 4, 2003
  2. xuatla
    Replies:
    1
    Views:
    367
    Denis Remezov
    Jul 10, 2004
  3. Cronus
    Replies:
    1
    Views:
    676
    Paul Mensonides
    Jul 15, 2004
  4. Neil Zanella

    preprocessor question

    Neil Zanella, Nov 6, 2003, in forum: C Programming
    Replies:
    4
    Views:
    324
    Eric Sosman
    Nov 6, 2003
  5. Charlie Zender

    C-preprocessor macro question

    Charlie Zender, Dec 24, 2003, in forum: C Programming
    Replies:
    3
    Views:
    460
    Richard Bos
    Dec 24, 2003
Loading...

Share This Page