What exactly so you want?

Either you have an va_list and want to give it to NSLog? Then use
void NSLogv(NSString *format, va_list args);

But I think you want to know what the va_list contains.
Then you just loop over it.
"man stdarg" will help.

Example:
           void foo(char *fmt, ...)
           {
                   va_list ap;
                   int d;
                   char c, *p, *s;

                   va_start(ap, fmt);
                   while (*fmt)
                           switch(*fmt++) {
                           case 's':                       /* string */
                                   s = va_arg(ap, char *);
                                   printf("string %s\n", s);
                                   break;
                           case 'd':                       /* int */
                                   d = va_arg(ap, int);
                                   printf("int %d\n", d);
                                   break;
                           case 'c':                       /* char */
                                   c = va_arg(ap, char);
                                   printf("char %c\n", c);
                                   break;
                           }
                   va_end(ap);
           }


Have a nice day,

        atze



Am 17.06.2010 um 14:21 schrieb Matt James:

> Hi everyone,
> 
> Can anyone tell me how to NSLog() a va_list variable so I can see what's in 
> it?
> 
> Thanks for the help!
> 
> -Matt_______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/atze%40freeport.de
> 
> This email sent to a...@freeport.de

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to