[ACCEPTED]-Caret in objective C-syntax
It depends on the context. In the example 7 you show, it's used to denote a Block. The 6 caret symbol is also the bitwise XOR operator in C-based languages 5 — that's what most programmers would identify 4 it as, so it's good to understand that it 3 can be both depending on where it appears, much 2 like *
, etc.
And while we're suggesting references, one 1 simply has to include Apple's official Blocks reference.
The caret represents a block or a closure 3 which carries around or contains the lexical 2 scope. They are similar to blocks in ruby. An 1 excellent reference can be found here.
Like ennuikiller said, it indicates a block. If 6 you want to learn more, Ars Technica had 5 an excellent in-depth review of Snow Leopard that 4 described not only blocks and closures, but 3 also Grand Central Dispatch and all the 2 other new technologies in Mac OS X 10.6. Highly 1 recommended.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.