What is this strange function definition syntax in C? -


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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -