[squeak-dev] Bad value for Random seed ?

Stéphane Rollandin lecteur at zogotounga.net
Sun Sep 21 16:07:01 UTC 2014


I should add that it is only the first integer that is always 1:

((1 to: 1000) collect: [:n | (Random seed: 1000 atRandom) nextInt: 10; 
nextInt: 10]) asSet

gives

  a Set(1 2 3 4 5 6 7 8 9 10)


Stef

> Actually it looks like using smallish values for seed is a problem too:
>
> ((1 to: 1000) collect: [:n | (Random seed: 1000 atRandom) nextInt: 10])
> asSet
>
> gives
>
> a Set(1)
>
>
> Stef
>
>



More information about the Squeak-dev mailing list