• 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 argument list not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Variable argument list not working


  • Subject: RE: Variable argument list not working
  • From: Kevin Elliott <email@hidden>
  • Date: Tue, 13 Aug 2002 11:10:18 -0700

Umm. Shouldn't you be calling vprintf?

-Kevin Elliott
Software Engineer
CharisMac Engineering

> ----------
> From: Pierre-Olivier Latour
> Sent: Tuesday, August 13, 2002 10:56
> To: Cocoa Mailinglist
> Subject: Variable argument list not working
>
> Hi,
>
> In a .cp file I have this function I'd like to call (it's just a test now:
> it'll get more complicated later ;) ):
>
> void PixelShox_LogMessage(PSEStringPtr message, ...)
> {
> va_list args;
>
> va_start(args, message);
> printf(message, args);
> va_end(args);
> printf("\n");
> }
>
> However, calling:
> PixelShox_LogMessage("Test: %s %s", "(1)", "(2)");
>
> prints:
> "Test: (2)" and the new line char
>
> I've done many tests, but I can't figure out what's going wrong, and why
> the
> 2 argument disappears... Is it because the function is in a .cp file?
>
>
> _____________________________________________________________
>
> Pierre-Olivier Latour email@hidden
> Lausanne, Switzerland http://www.pol-online.net
> _______________________________________________
> 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.
_______________________________________________
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.

  • Prev by Date: Variable argument list not working
  • Next by Date: Re: Variable argument list not working
  • Previous by thread: Re: Variable argument list not working
  • Next by thread: Using bundles
  • Index(es):
    • Date
    • Thread