Advertisement

Is there a limit to function arguments?

Started by January 12, 2002 04:59 PM
0 comments, last by Squared 22 years, 8 months ago
simple question, unless i dont know what the hell im talkming about. thx for responding.
There is not theoretical limit. However there may be some practical limitations :

- function arguments are put on the stack, which may overflow, even if it is unlikely to happen from the arguments of a single function (unless you have really big arguments passed by value).

- MSVC6 has a 255 character function identifier limit. And, for overloading purposes, it mangles function names, appending parameter type information to it. If the result is longer than 255 character, it gets truncated, which means that the compiler may not be able to distinguish between the two if the telltale identifiers have been cut off. This happens most frequently with templates.

- Your compiler may barf if you give it indigest code.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement