Limited Number of method arguments?

Ivan Brusic ibrusic at wsicorp.com
Mon Dec 13 14:49:51 UTC 1999


Udo Schneider wrote:
> 
> Does Squeak have a limitation regarding
> the number of arguments passed to a method?
> 
> I'm using 2.7alpha and got an error message
> 'Too Arguments' by trying to pass more than
> 15 arguments.

Yes, Squeak methods are limited to 15 arguments.  The limitation is set
in the Encoder>>bindArg: method.  I do not know why/how the number 15
was chosen, but it is hardcoded in the sources. 

I have encountered the same problem and my solution was to use multiple
methods with a smaller number of arguments and then cascade the
messages.  In some cases, I made each method have one argument and used
15+ cascades.

Ivan

-- 

Ivan Brusic                    |  "Computers are nothing but a perfect
E-mail: ibrusic at wsicorp.com    |   illusion of order" - Iggy Pop
Phone: (978) 262-0758          |





More information about the Squeak-dev mailing list