• 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: next problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: next problem


  • Subject: Re: next problem
  • From: "Clark Cox" <email@hidden>
  • Date: Wed, 20 Jun 2007 16:18:40 -0700

On 6/20/07, Jeffrey Oleander <email@hidden> wrote:
> headers (e.g. if cstring simply pulls in string.h
> with __cplusplus defined)

What's the current rule WRT those under-lines?
Are all such symbols prefixed with at least one under-line
system/compiler symbols that developers should avoid
re-defining?

Yes. The C and C++ standards reserve a number of identifiers. Among them are:

Any identifier that starts with "__"
Any identifier that starts with "_" followed by a capital letter
Any file-scoped identifier that starts with "_"

C++ adds several, most notably:
Any identifier that *contains* "__"

Why was there a move to multiple (difficult to see and
count with the fonts I tend to use, though I can see them,
now, in this out-going message) under-lines?

This wasn't a recent move, standard C has always reserved such identifiers (some examples that the compiler defines are __FILE__, __func__, etc.)

--
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: 
 >Re: next problem (From: Thomas Engelmeier <email@hidden>)
 >Re: next problem (From: Jeffrey Oleander <email@hidden>)

  • Prev by Date: [ADMIN] Advocacy [was: So I'm a n00b..]
  • Next by Date: Xcode 2.5?
  • Previous by thread: Re: next problem
  • Next by thread: Re: next problem
  • Index(es):
    • Date
    • Thread