Re: variadic variable argument list in #define
Re: variadic variable argument list in #define
- Subject: Re: variadic variable argument list in #define
- From: Marten van Gelderen <email@hidden>
- Date: Tue, 10 Feb 2004 17:44:17 +0100
Hello Ben,
Try (right from the Cocoa docs):
#define myDebug(format, args...) fprintf(stderr, format, args)
or, as I did:
#define myDebug(format, args...) NSLog(format, args)
then call somewhere (I did it in -awakeFromNib):
myDebug(@"Debug: %d", 1);
myDebug(@"Debug: %d, %d", 1, 2);
myDebug(@"Debug: %d, %d, %d", 1, 2, 3);
I checked it on OSX 10.3.2 using Xcode 1.1. It worked fine.
On 10 Feb 2004, at 1:30 AM, Ben Dougall wrote:
is it possible to use the variadic macros which are detailed here:
<http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/cpp/
Variadic-Macros.html> in obj-c code?
--
Groeten, Marten
_______________________________________________
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.