• 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: Preprocessing within @"SOMEDEFINEDSTRING"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preprocessing within @"SOMEDEFINEDSTRING"


  • Subject: Re: Preprocessing within @"SOMEDEFINEDSTRING"
  • From: Clark Cox <email@hidden>
  • Date: Fri, 20 Mar 2009 11:13:58 -0700

On Fri, Mar 20, 2009 at 10:55 AM, Daniel Luis dos Santos
<email@hidden> wrote:
> Hello,
>
> I am trying to do the thing in the subject. I define a constant with
>
> #define SOMECONST aStringWithoutWhiteSpace
>
> , later in the code I have a call to a C function defined in a .m that is
> called like :
>
> aFunctionCall(@"SOMECONST")
>
> The method ends up creating a directory in which the last path component is
> the function argument. The #define is not preprocessed and instead of having
> a directory named after the constant I get the constant name in the path.
>
> Shouldn't the preprocessor see this constant before compiling and replace it

No, it shouldn't. The C preprocessor only operates on complete tokens
(i.e. it won't change part of a token, such as the text within a pair
of quotes).

--
Clark S. Cox III
email@hidden
 _______________________________________________
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: 
 >Preprocessing within @"SOMEDEFINEDSTRING" (From: Daniel Luis dos Santos <email@hidden>)

  • Prev by Date: Re: Preprocessing within @"SOMEDEFINEDSTRING"
  • Next by Date: Re: Preprocessing within @"SOMEDEFINEDSTRING"
  • Previous by thread: Re: Preprocessing within @"SOMEDEFINEDSTRING"
  • Next by thread: Re: Preprocessing within @"SOMEDEFINEDSTRING"
  • Index(es):
    • Date
    • Thread