C“块”插入符 [英] C "block" caret character
本文介绍了C“块”插入符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我注意到此涉及插入符号(^)字符的声明固定在顶部的cdecl.org网站上:
I've noticed that this declaration involving a caret (^) character is pinned on the cdecl.org site at the top:
// "cast foo into block(int, long long) returning double"
(double (^)(int , long long ))foo
有人可以在这里解释插入符号的目的是什么?这真的是C声明中的有效字符,还是某个东西的占位符?
Can somebody explain what is the purpose of the caret character here? Is this really a valid character in C declarations, or is this a placeholder for something?
推荐答案
插入符号是扩展的一部分C语言以使用块。块是Clang和Apple的GCC支持的C语言的扩展。它不是严格符合C的语言(也就是说,它不是C标准定义的核心C语言的一部分)。
The caret is part of an extension to the C language to work with blocks. Blocks are an extension to C supported by Clang and Apple’s GCC. It is not strictly conforming C (that is, not part of the core C language defined by the C standard).
这篇关于C“块”插入符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文