【发布时间】:2014-11-26 10:02:21
【问题描述】:
我下载了一段 C 代码,它使用这种定义函数的方式:
int somefunction(name1, name2)
int name1;
int name2;
{
// do stuff, using name1 and name2
}
您为什么或何时使用此语法,它与参数类型位于括号内的更广为人知的语法有何不同?
【问题讨论】:
-
参见例如this old question.
-
我认为How is the ANSI C function declaration an improvement on the old Kernighan and Ritchie style? 是一个很好的参考问题——也许是一个可以复制的问题。可能还有关于这种表示法的早期问题。