Implicit int rule in Function Parameters
Hello All,
My question is about the old implicit int rule. I do not use that one and as far as I know it is encouraged not to use and it is obselete now. However I want to learn it just in case I can see it in old codes.
I understand that if a function is defined without a return type it is assumed to return to int according to this rule.
Also not because of this rule but there is a different function parameter definition from the modern style. The parameters can be just typed as names and they can be declared inside the function, just like that:
Code:
int function(x,y){
int x;
char y;
...
}
My question is about function definitions which include only names as parameters and not declared in the function, like this:
Code:
int function(x,y){
...
}
Is it assumed that x and y are ints according to the implicit int rule? My book has an example similar to the one below:
Code:
int function(register x, register y){
...
}
I know what register is. But I don't know why the author wrote this example with a storage specifier. Is a specifier or qualifier required in parameter so that the implicit int rule works? Or does my example work too?