3 ms·
Yes, I knew that, though I did not mention it. In my previous comment, I was going to say (from memory), that in the second edition, i.e. in ANSI C, both type
by fuzztester 3y ago
Yes, I knew that, though I did not mention it.
In my previous comment, I was going to say (from memory), that in the second edition, i.e. in ANSI C, both types of declarations are allowed, old style and new style.
Also, if you just wrote the declaration (return value, then function name followed by types with arguments in parentheses), followed by a semicolon, without a function body in braces, it was called a function prototype.
MS C (as in, some version of Visual Studio's command line C compiler), had a flag to generate the prototypes from the function definitions. I had used it some. /Zg, possibly.
- trealira 3y agoSorry, I wasn't trying to imply that you didn't know that. I meant to suggest that it would be the most unambiguous way to differentiate them, but then realized that the names weren't accurate because C89 declarations aren't new anymore. So, I shouldn't have written the comment anyway.
- fuzztester 3y agoNot a problem anyway, but thanks for replying :) I see what you mean.