KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What is useful about this C syntax, using ' K&R ' style function declarations? int func (p, p2) void* p; int p2; { return 0; } I was able to write this in Visual Studio 2010 beta: // Yes, the arguments are flipped void f() { void* v = 0; func(5, v); } I don't understand. What's the point of this syntax? I can write: int func (p, p2) int p2; { return 0; } // And write int func (p, p2) { return 0; } The only thing it seems to specify is how many parameters it uses and the return type. I guess parameters without types is kind of cool, but why allow it and the int paramName after the function declarator? It's weird. Also, is this still standard C?
Tags (comma-separated)
Save Edits
Cancel