Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Demosthenes Koptsis
I wrote something that i think describes better the Rnd(). If you like it you can use or modify it for the wiki. Float = Rnd ( [ Min [ , Max ] ) Compute a pseudo-random floating point number between a lower Min limit value

Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Demosthenes Koptsis
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 i

Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Demosthenes Koptsis
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 i am not confused about min, max, i understand that these ar

Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Fabien Bodard
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 interva

Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Demosthenes Koptsis
Yes the first argument is the Min and the second is the Max. But if i pass one argument PRINT Rnd(2) this is equal PRINT Rnd(0, 2) so one argument is the Max parameter and the range is [0, 2] where 2=Max in example that is said ' Between 0 and 2 PRINT Rnd(2) so * If only one parameter is

Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Benoît Minisini
> For one parameter you still have > > * If only one parameter is specified, returns a pseudo-random in the > interval [ 0 , Min [. > > i think is > > * If only one parameter is specified, returns a pseudo-random in the > interval [ 0 , Max [. > > and something else what does it mean > 0, Max [

Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Demosthenes Koptsis
For one parameter you still have * If only one parameter is specified, returns a pseudo-random in the interval [ 0 , Min [. i think is * If only one parameter is specified, returns a pseudo-random in the interval [ 0 , Max [. and something else what does it mean 0, Max [. ? isn't it [0, Max]

Re: [Gambas-user] Rnd Wiki

2010-11-25 Thread Benoît Minisini
> In wiki the page http://gambasdoc.org/help/lang/rnd?show > > i think in these parts is hard read. > > * If no parameters is specified, returns a pseudo-random number in the > interval [ 0 , 1 [. > * If the one parameter is specified, returns a pseudo-random in the > interval [ 0 , Min [

[Gambas-user] Rnd Wiki

2010-11-25 Thread Demosthenes Koptsis
In wiki the page http://gambasdoc.org/help/lang/rnd?show i think in these parts is hard read. * If no parameters is specified, returns a pseudo-random number in the interval [ 0 , 1 [. * If the one parameter is specified, returns a pseudo-random in the interval [ 0 , Min [. * If the two