Re: max no of parameters a function can take?

From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 09/10/04


Date: Fri, 10 Sep 2004 12:08:05 -0400

Mike Wahler wrote:
> "Victor Bazarov" <v.Abazarov@comAcast.net> wrote in message
> news:X9k0d.1447$Ae.1138@newsread1.dllstx09.us.to.verio.net...
>
>>Master wrote:
>>
>>>what is the maximum no. of arguments a function can take?
>>
>>The Standard requires at least 256.
>
>
> To "Master":
>
> But if you find you need more than a maximum of perhaps
> ten arguments (my personal threshold is more like six
> or seven), imo you should consider refactoring your code
> to use more functions with 'smaller' signatures. Keep
> It Readable.

If the OP is working on some kind of automated source code
generator, the resulting code doesn't have to be readable by
anything (or anybody) except a compiler.

Victor



Relevant Pages

  • Re: need help on using toupper!
    ... |> 'extension' to the standard library provided by ... inline void ToUpper(char& Char) ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Std::multisets real application
    ... "Mike Wahler" ... >> than the other Containers in the Standard in case of multiset's strength. ... S Kim ...
    (alt.comp.lang.learn.c-cpp)
  • Re: role of semicolon
    ... "Mike Wahler" writes: ... > A declaration is a statement. ... No, it isn't, according to the grammar in the standard. ...
    (comp.lang.c)
  • Re: 1 byte for character
    ... "Mike Wahler" writes: ... >> The type of the expression, is int. ... is an integer value which the C standard ... Keith Thompson kst-u@mib.org ...
    (comp.lang.c)