Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7045819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:34:36+00:00 2026-05-28T02:34:36+00:00

I recently noticed this while working on an app- why is it that when

  • 0

I recently noticed this while working on an app- why is it that when you import a file you use

#import "SomeFile.h"

but when you are manipulating a string you use the @ symbol before the string, such as

NSLog(@"Hello World");

I know these two are not interchangeable, so is there a specific reason the #import directive doesn’t take a type of string? There must be some history/a good reason behind this. Maybe. Thanks for your time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:34:36+00:00Added an answer on May 28, 2026 at 2:34 am

    The #import statement is a preprocessor macro that is used when the compiler compiles your code. It makes sure that the file you are going to import is actually added to the source file you’re compiling.

    The compiler takes its own type of string to find the file. When not using the " you are actually talking about a C type string, or char[].
    When using the @"" directive, you are actually talking about an object of type NSString, which is in the end also, a 0-terminated array of chars.

    So basically, they’re both strings. But the @"" directive is used in Objective C to denote a string object, and the standard " " notation is used for lower level languages’ string types.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was working on my project for a while and recently noticed that when
I've noticed that Lucene recently released v2.9 (on 25th September this year - 2009),
I've been editing CSS using Firebug in Firefox, but recently noticed that Chrome is
i have noticed that eclipse recently creates a .settings directory with 1 file inside
I've been working a lot with C# recently, and I've noticed that most code
I just recently noticed this behaviour. To put it shortly, it displays the commits
I recently noticed the CallByName keyword in VB6. Since this takes a object, procedure
I've noticed recently in PHP you can do this. $myNewArray = $oldArray + $someArray;
I recently noticed that colors are now displaying darker on iPhone than their actual
I've only recently noticed the Filter element in the definition file for a SharePoint

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.