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 8223275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:38:13+00:00 2026-06-07T14:38:13+00:00

I am looking at Objective-C and I notice, for example, a class-interface declaration begins

  • 0

I am looking at Objective-C and I notice, for example, a class-interface declaration begins with @interface. Fine, no problema. The text, therefore, suggests no space is permitted between the @ and interface. However, when I pass the following simple example to the GCC compiler in a *.m file:

@ interface A
@ end

the compiler accepts the code without complaint. Can Anyone point Me in the direction of a reference which says explicitly whether or not @ interface is also considered acceptable by the Objective-C specification? I found nothing in Apple’s 2008 and 2011 documents to say one way or the other besides the simple text alluded to earlier in the question.

Thanks in advance.

EDIT: It may be worth noting Emacs performs text coloring based on whether the identifier is a keyword or not; keywords are blue and non-keywords are yellow. The @interface colors blue and @ interface colors yellow. Similar behavior occurs in Vim.

  • 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-06-07T14:38:16+00:00Added an answer on June 7, 2026 at 2:38 pm

    There is no formal specification for Objective-C (beyond The Objective-C Programming Language). There’s definitely no BNF-style definition of the whitespace conventions. If it compiles, that’s about the closest we have to “legal.” This is true of many languages. Perl for instance is best defined as “those strings which the perl executable will not reject.” (At least in my opinion….)

    That said, the correct style is @interface without a space. See Defining a Class.

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

Sidebar

Related Questions

i'm looking for a objective-c class that supports syntax hightlighting a string. is there
I'm looking for a class in Objective C similar to C#'s KeyValuePair (even without
I am looking at an example online that contains this code in objective-c -(void)dealloc
I'm looking for an objective-c library or just the functions that can handle calculating
I am looking for a simple but efficient Objective-C algorithm which, starting from a
I am new to Objective-C and I am looking for an eval statement like
I can do this in Objective-C on the iPhone, but now I'm looking for
I'm fairly new to objective-c, and am looking to pass a number of key-value
I've recently started down the road of programming in Objective-C, and I'm now looking
I'm looking for an Objective-C library for an iOS app that will parse and

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.