[Somewhat-OT] Unexpected behaviour of variable argument lists
[Somewhat-OT] Unexpected behaviour of variable argument lists
- Subject: [Somewhat-OT] Unexpected behaviour of variable argument lists
- From: j o a r <email@hidden>
- Date: Thu, 16 Sep 2004 15:03:11 +0200
Consider the following log statement with an incorrect, or at least
unusual, set of arguments:
int someIntegerValue = 3;
NSLog(@"A format string: %d" "Some other string", someIntegerValue);
I would have expected it to generate a compiler error, but for some
reason it doesn't even log a warning. Also, it kind of "works" and
outputs:
A format string: 3Some other string
Apparently there is something I don't know or understand about what
happens to arguments passed to a function/method that accept a variable
number of arguments... Can someone please point me to the fine
documentation?
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden