[Gambas-user] Bug in Min function

Benoit Minisini gambas at ...1...
Mon Feb 18 15:30:02 CET 2008


On samedi 16 février 2008, Nx GT-R BOY wrote:
>  There is a Bug in Min function, or at least, an error in the function
> syntax
>
> The syntax is:
> Min (Value as variant, Value 2 as variant, Value N as variant)
> (at least thats what the code editor says)
>
> When comparing 2 Values, everything works OK, but when more that 2, I got a
> "Too many arguments error"
>
> I Think thats a bug, but I am not sure, since the HELP documentation says
> only two parameters are allowed
>
> What I want to do is:
> Min(a, e, i, o, u)
>
> But of course, an easy workaround exist:
> Min(Min(Min(a, e), Min(i, o)), u)

The code editor is wrong. Min and Max take only two arguments.

Regards,

-- 
Benoit Minisini




More information about the User mailing list