• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: variadic variable argument list in #define
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variadic variable argument list in #define


  • Subject: Re: variadic variable argument list in #define
  • From: Jens Bauer <email@hidden>
  • Date: Tue, 10 Feb 2004 02:34:00 +0100

Hi Ben (and others)

On Tuesday, Feb 10, 2004, at 01:30 Europe/Copenhagen, Ben Dougall wrote:

i'd like to use a variable argument list in a #define macro just like what's at the start of the above linked to page, but when i use it like this for example:

#define mf(...) myfunction(__VA_ARGS__,NULL)

I claimed that you need at least one argument, this is uhm not correct. =)
Sorry for my mistake. ;)

-But that's because I confused it with function declarations in C.

Try out the example from my page. This works on Project Builder with GCC >= 2.9, it should also work with CodeWarrior and even MPW.


Love,
Jens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: variadic variable argument list in #define
      • From: Clark Cox <email@hidden>
References: 
 >variadic variable argument list in #define (From: Ben Dougall <email@hidden>)

  • Prev by Date: Re: variadic variable argument list in #define
  • Next by Date: Carbon App -> Cocoa Bundle -> Cocoa Bundle...
  • Previous by thread: Re: variadic variable argument list in #define
  • Next by thread: Re: variadic variable argument list in #define
  • Index(es):
    • Date
    • Thread