• 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 varia ble argument lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: [Somewhat-OT] Unexpected behaviour of varia ble argument lists
  • From: Andréas Saudemont <email@hidden>
  • Date: Fri, 17 Sep 2004 09:21:37 +0200

Hi Joar,

>         NSLog(@"A format string: %d" "Some other string", someIntegerValue);

Note that the two strings are separated by a space and not by a comma.

In C you can concatenate literal strings by separating them with
spaces, such as:

        const char *str = "123" "456" "789";

which is equivalent to:

        const char *str = "123456789";

As Objectice-C is a superset of C, your code is the same as:

        NSLog(@"A format string: %d Some other string", someIntegerValue);

Andréas
 _______________________________________________
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

  • Follow-Ups:
    • Re: [Somewhat-OT] Unexpected behaviour of varia ble argument lists
      • From: Andréas Saudemont <email@hidden>
References: 
 >[Somewhat-OT] Unexpected behaviour of variable argument lists (From: j o a r <email@hidden>)

  • Prev by Date: Re: Subclassing NSSliderCell
  • Next by Date: Re: Couple more binding questions
  • Previous by thread: Re: [Somewhat-OT] Unexpected behaviour of variable argument lists
  • Next by thread: Re: [Somewhat-OT] Unexpected behaviour of varia ble argument lists
  • Index(es):
    • Date
    • Thread