What is this strange function definition syntax in C? -
this question has answer here:
i've seen few function definitions while playing gnu bison:
static value ripper_pos(self) value self; { //code here }
why type of self
outside of parenthesis? valid c?
those old k&r style function parameter declarations, declaring types of parameters separately:
int func(a, b, c) int a; int b; int c; { return + b + c; }
this same more modern way declare function parameters:
int func(int a, int b, int c) { return + b + c; }
the "new style" declarations universally preferred.
Comments
Post a Comment