Autor Tema: Removal of 15-parameter limit  (Leído 3325 veces)

Rincewind

  • Newbie
  • *
  • Mensajes: 10
  • Karma: 0
    • Strictly Rational
Removal of 15-parameter limit
« en: Mayo 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:

Citar
Too 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!
Getting things done is vital.

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12541
  • Karma: 370
Re: Removal of 15-parameter limit
« Respuesta #1 en: Mayo 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...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Rincewind

  • Newbie
  • *
  • Mensajes: 10
  • Karma: 0
    • Strictly Rational
Re: Removal of 15-parameter limit
« Respuesta #2 en: Mayo 17, 2008, 03:26:51 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?
Getting things done is vital.

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12541
  • Karma: 370
Re: Removal of 15-parameter limit
« Respuesta #3 en: Mayo 17, 2008, 06:39:16 pm »
I'll considere it...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Rincewind

  • Newbie
  • *
  • Mensajes: 10
  • Karma: 0
    • Strictly Rational
Re: Removal of 15-parameter limit
« Respuesta #4 en: Mayo 17, 2008, 06:59:21 pm »
I'll considere it...

You would be my hero of the year...  :o
Getting things done is vital.

MythomizeR

  • Full Member
  • ***
  • Mensajes: 166
  • Karma: 3
    • Zonatube
Re: Removal of 15-parameter limit
« Respuesta #5 en: Diciembre 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…
« última modificación: Diciembre 09, 2008, 01:25:27 am por MythomizeR »

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12541
  • Karma: 370
Re: Removal of 15-parameter limit
« Respuesta #6 en: Diciembre 09, 2008, 01:34:40 am »
vargs not possible...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

MythomizeR

  • Full Member
  • ***
  • Mensajes: 166
  • Karma: 3
    • Zonatube
Re: Removal of 15-parameter limit
« Respuesta #7 en: Diciembre 09, 2008, 01:48:44 am »
Ok, thanks.