max no of parameters a function can take?

Discussion in 'C++' started by Master, Sep 10, 2004.

  1. Master

    Master Guest

    what is the maximum no. of arguments a function can take?
    urgent
    thanks ..
     
    Master, Sep 10, 2004
    #1
    1. Advertising

  2. Master wrote:
    > what is the maximum no. of arguments a function can take?


    The Standard requires at least 256.

    > urgent


    Victor
     
    Victor Bazarov, Sep 10, 2004
    #2
    1. Advertising

  3. Master

    Mike Wahler Guest

    "Victor Bazarov" <> wrote in message
    news:X9k0d.1447$09.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.

    -Mike
     
    Mike Wahler, Sep 10, 2004
    #3
  4. Mike Wahler wrote:
    > "Victor Bazarov" <> wrote in message
    > news:X9k0d.1447$09.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
     
    Victor Bazarov, Sep 10, 2004
    #4
  5. Master

    Mike Wahler Guest

    "Victor Bazarov" <> wrote in message
    news:wjk0d.1449$09.us.to.verio.net...
    > Mike Wahler wrote:
    > > "Victor Bazarov" <> wrote in message
    > > news:X9k0d.1447$09.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.


    Which is why it's a good idea to give some context when asking
    such 'high level' questions, which OP did not do. But yes, I
    agree with your thoughts about this if this is some sort of
    code generation issue.

    -Mike
     
    Mike Wahler, Sep 10, 2004
    #5
  6. Master

    Julie Guest

    Mike Wahler wrote:
    >
    > "Victor Bazarov" <> wrote in message
    > news:wjk0d.1449$09.us.to.verio.net...
    > > Mike Wahler wrote:
    > > > "Victor Bazarov" <> wrote in message
    > > > news:X9k0d.1447$09.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.

    >
    > Which is why it's a good idea to give some context when asking
    > such 'high level' questions, which OP did not do.


    You interpret "what is the maximum no. of arguments a function can take?" as a
    'high level' question???

    I don't see any level to it at all, just a simple question w/ an equally simple
    answer.
     
    Julie, Sep 10, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Burkhard Hassel

    type Map does not take parameters ?

    Burkhard Hassel, Aug 9, 2006, in forum: Java
    Replies:
    2
    Views:
    3,741
    Mike Schilling
    Aug 10, 2006
  2. Summercool
    Replies:
    9
    Views:
    902
    dorayme
    Oct 23, 2007
  3. Henry Olders
    Replies:
    2
    Views:
    408
    Thomas Rachel
    May 31, 2011
  4. Greg Ferris

    Textarea max rows and max characters per row

    Greg Ferris, Jan 16, 2004, in forum: Javascript
    Replies:
    2
    Views:
    609
    Greg Ferris
    Jan 16, 2004
  5. kriton
    Replies:
    0
    Views:
    348
    kriton
    Apr 22, 2005
Loading...

Share This Page