in reply to Prototyping - is it necessary?
Hi,
Functions prototyped with () indicate functions that take no arguments at all. Even more, functions with () are candidates for inlining, meaning the compiler will look if the result of the function is a constant or lexically scoped scalar with no other references. If so, then the value will be used in place of calls (== quicker!).
So, if you prototype with () and pass arguments when calling you'll receive a 'too many arguments error'.
You can leave out the () or prototype with the correct number of arguments ($$).
|
|---|