What does the "and" keyword mean in Objective-C?

I typed a comment in Xcode, but forgot the lead // . I noticed that and was highlighted as a keyword. I did a little Googling, but I can’t understand what it is doing (or even if it is a real keyword).

What does it mean?

+7
ios objective-c
source share
2 answers

It is synonymous with && . See iso646.h .

+14
source share

This is not a keyword. Objective-C uses the same keywords as C, with optional keywords that always begin with "@".

EDIT: This question does not answer the original post (see Rob Napir succint's answer for this), but it emphasizes that the β€œand” is a macro in some standard library headers, not a reserved word.

Quote from standard C (C11, n1570), p. 58:

6.4.1 Keywords

keyword: one of auto, break, case, ... [list of words not including 'and']

+4
source share

All Articles