• 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: [Somewhat-OT] Unexpected behaviour of variable argument lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Somewhat-OT] Unexpected behaviour of variable argument lists


  • Subject: Re: [Somewhat-OT] Unexpected behaviour of variable argument lists
  • From: Tim Hart <email@hidden>
  • Date: Thu, 16 Sep 2004 08:13:41 -0500


On Sep 16, 2004, at 8:03 AM, j o a r wrote:

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);

There is no comma between @"A format string: %d" and "Some other string". C compilers concatenate strings separated by nothing but white space. I've wondered what gcc did with NSString strings. Never thought about what would happen with mixed strings. Your experiment above apparently answers the question, tho I'd be a bit leery of relying on it.


Tim

_______________________________________________
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


References: 
 >[Somewhat-OT] Unexpected behaviour of variable argument lists (From: j o a r <email@hidden>)

  • Prev by Date: Re: [Somewhat-OT] Unexpected behaviour of variable argument lists
  • Next by Date: deployment vs. development style weirdness
  • Previous by thread: Re: [Somewhat-OT] Unexpected behaviour of variable argument lists
  • Next by thread: Re: [Somewhat-OT] Unexpected behaviour of variable argument lists
  • Index(es):
    • Date
    • Thread