hm... i think i have got it. The function accepts two parameters
Rnd ( [ Min [ , Max ] ) the Min param and the Max param. if we pass only one param it takes as first argument, so it is the Min argument BUT BUT BUT... it uses it as Max value, as upper limit, because the lower limit by default is 0 !!! so the range is [0, Min] !!! same to say the range is [0, Argument1] Is that really happen ??? If this is the point it is really very strange to understand it for me at least because suddenly the Min word became Max limit. On Thu, 2010-11-25 at 14:26 +0100, Fabien Bodard wrote: > if i wrote that like a function ... > > rnd(min as float, max as float) > > the variable named min don't change his name > > i think benoit should take others name than min/max > > > val1/val2 ? > > Float = Rnd ( [ Val1 [ , Val2 ] ) > > > * If no parameters is specified, returns a pseudo-random number in the > interval [ 0 , 1 [. > > * If only one parameter is specified it is Max value, returns a > pseudo-random in the > interval [ 0 , Val1 [. > > * If the two parameters are specified they are Min, Max values, > returns a pseudo-random in the interval [ Val1 , Val2 ]. > > > -- > Fabien Bodard > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user