Re: bool, BOOL
Re: bool, BOOL
- Subject: Re: bool, BOOL
- From: "Sean McBride" <email@hidden>
- Date: Wed, 30 May 2007 10:45:37 -0400
- Organization: Rogue Research
On 2007-05-29 12:18, Healy, Matt said:
>> Is there any reason lowercase bool is not considered a keyword in .m
>> files, while it is in headers? Uppercase BOOL is colored in both types
>> of files, but I prefer using lower case.
>
>At a guess, this is because in the case of the header file, it's being
>interpreted using the C language rule set, whereas in the .m file it's being
>interpreted using the Objective-C rule set. (Remember, the editor is just
>using the file extension to pick the filter to be used in syntax coloring.)
>
>Under the C99 language specification updates, a "_Bool" type was added to
>the C language, which is used to define a "bool" type in <stdbool.h>.
>However, I'm unsure if this has been made an official part of the
>Objective-C language yet, and thus it's entirely possible that the syntax
>coloring for that language doesn't include this type.
Well, Objective-C is supposed to be a superset of C, right? And C99 has
'bool', thus so does Objective-C. And many of Apple's headers seem to
expect C99 (ex: ABAddressBookC.h uses 'bool' and it is not a C++ API).
I'd say it's an Xcode bug.
Pity there was no 'bool' in the original C. It sucks to have _Bool,
bool, BOOL, and Boolean. :(
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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