• 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: variable arguments in ObjC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable arguments in ObjC


  • Subject: Re: variable arguments in ObjC
  • From: Manfred Lippert <email@hidden>
  • Date: Fri, 22 Feb 2002 18:39:06 +0100

> what happened to number 1?

I never used va_list myself, but could it be that va_start also returns an
item?

So this code my work (untested!):

- (id)initWith:(id)item, ...
{
va_list list;
NSLog( @"va_list started" );
id current = va_start( list, item );
while( current ) {
NSLog( @"arg processed %@", [current description] );
current = va_arg( list, id );
}
va_end( list );
NSLog( @"va_list ended" );
return self;
}

Regards,
Mani
_______________________________________________
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.

References: 
 >Re: variable arguments in ObjC (From: Nicholas Shanks <email@hidden>)

  • Prev by Date: RE: variable arguments in ObjC
  • Next by Date: Re: +poseAsClass and instance variables
  • Previous by thread: Re: variable arguments in ObjC
  • Next by thread: RE: variable arguments in ObjC
  • Index(es):
    • Date
    • Thread