Bennu Game Development

English Forums => Suggestions => Topic started by: Rincewind on May 17, 2008, 10:14:36 AM

Title: Removal of 15-parameter limit
Post by: Rincewind on May 17, 2008, 10:14:36 AM
There seems to be a limit of 15 parameters for processes and functions. I get the following error when I use more parameters:

QuoteToo many parameters in a definition (<name of last parameter>)

It would be nice if this limitation could be removed instead of having to circumvent it.  :-\ Thanks!
Title: Re: Removal of 15-parameter limit
Post by: SplinterGU on May 17, 2008, 01:52:10 PM
16 parameters are the limit... more of 15 parameters is a horror, maybe you must use a struct pointer...
Title: Re: Removal of 15-parameter limit
Post by: Rincewind on May 17, 2008, 03:26:51 PM
Quote from: SplinterGU on May 17, 2008, 01:52:10 PM
16 parameters are the limit...more of 15 parameters is a horror, maybe you must use a struct pointer...

The limit is 15 as far as I can see. Whether more than 15 parameters are used should really be up to the user, no? In my case it certainly is not a horror - I need 16 parameters, so that's one more than the max, and using a struct pointer or a user defined type pointer for this extra parameter (and the parameter the pointer will replace) is simply dirty and ugly.

Couldn't you remove the limit (why would there be a limit in the first place?) Or if that's too hard code-wise, maybe you could increase the limit to something very high?
Title: Re: Removal of 15-parameter limit
Post by: SplinterGU on May 17, 2008, 06:39:16 PM
I'll considere it...
Title: Re: Removal of 15-parameter limit
Post by: Rincewind on May 17, 2008, 06:59:21 PM
Quote from: SplinterGU on May 17, 2008, 06:39:16 PM
I'll considere it...

You would be my hero of the year...  :o
Title: Re: Removal of 15-parameter limit
Post by: MythomizeR on December 09, 2008, 01:23:19 AM
By the way, I wonder if it's possible in Bennu to create functions/process with a variable number of parameters (like in C with '...').

I believe no, but I ask it...
Title: Re: Removal of 15-parameter limit
Post by: SplinterGU on December 09, 2008, 01:34:40 AM
vargs not possible...
Title: Re: Removal of 15-parameter limit
Post by: MythomizeR on December 09, 2008, 01:48:44 AM
Ok, thanks.