• 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: Preprocessor concatenation questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preprocessor concatenation questions


  • Subject: Re: Preprocessor concatenation questions
  • From: leenoori <email@hidden>
  • Date: Thu, 14 Dec 2006 15:59:15 +0100

El 14/12/2006, a las 15:08, Michel Schinz escribió:

Yep, but the FAQ entry says at the end "An equivalent circumlocution is necessary with the token-pasting operator ## when the values (rather than the names) of two macros are to be concatenated". By "equivalent circumlocution", the following is meant:

#define foo FOO
#define bar BAR

#define MY_MACRO0(a,b) a ## b
#define MY_MACRO(a,b) MY_MACRO0(a,b)

MY_MACRO(foo,bar)

Here MY_MACRO(foo,bar) yields FOOBAR, which is what you want I think.

Yep, that's exactly right. Thanks very much for the help.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Preprocessor concatenation questions (From: leenoori <email@hidden>)
 >Re: Preprocessor concatenation questions (From: Michel Schinz <email@hidden>)
 >Re: Preprocessor concatenation questions (From: leenoori <email@hidden>)
 >Re: Preprocessor concatenation questions (From: Michel Schinz <email@hidden>)

  • Prev by Date: Why Detail View AND Groups and Files?
  • Next by Date: Re: Why Detail View AND Groups and Files?
  • Previous by thread: Re: Preprocessor concatenation questions
  • Next by thread: Unit testing a plug-in architecture
  • Index(es):
    • Date
    • Thread