目标C中的插入号 [英] Caret in objective C

查看:92
本文介绍了目标C中的插入号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标C中的插入符号是什么意思?

What does the caret in objective C mean?

即.

void (^handler)(NSInteger);

来自推荐答案

这取决于上下文.在您显示的示例中,它用来表示一个块.插入符号也是基于C的语言中的按位XOR运算符-大多数程序员都使用会将其标识为,因此很高兴了解到,这两者都取决于它的出现位置,就像*等.

It depends on the context. In the example you show, it's used to denote a Block. The caret symbol is also the bitwise XOR operator in C-based languages — that's what most programmers would identify it as, so it's good to understand that it can be both depending on where it appears, much like *, etc.

我们建议参考时,只需添加苹果官方的Blocks参考书.

And while we're suggesting references, one simply has to include Apple's official Blocks reference.

这篇关于目标C中的插入号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆