问题描述
在阅读一些FreeBSD的源代码code(参见:的线158-173),我发现变量声明遵循中定义功能标题。
When reading some FreeBSD source code (See: radix.h lines 158-173), I found variable declarations that followed the "function heading" in the definition.
这是在ISO C(C99)有效吗?当这应该在生产中code来完成,而不是仅仅声明中的变量功能标题?为什么这里正在做什么?
Is this valid in ISO C (C99)? when should this be done in production code instead of just declaring the variables within the "function heading?" Why is it being done here?
我指的是功能的标题看起来像这样的字符串: INT someFunction(INT I,INT B){
I refer to the function heading the string that looks like this: int someFunction(int i, int b) {
推荐答案
这看起来像K&安培; R(pre-ANSI)的风格。我不认为它是有效的C99,但使用的是C99他们?乔尔
That looks like K&R (pre-ANSI) style. I don't think it's valid C99, but are they using C99? Joel
这篇关于功能定义抽穗后的C变量声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!