item random() (was Random(3) often returns 1)
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu Jun 8 15:34:48 EDT 2006
Hi Dar,
Rev 2.7.2 gives exactly the same results.
Best,
Mark
--
Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Download ErrorLib at http://economy-x-talk.com/developers.html and
get full control of error handling in Revolution.
Op 8-jun-2006, om 21:14 heeft Dar Scott het volgende geschreven:
>
>
> My variation:
>
> on mouseUp
> set the cursor to watch
> put empty into field "field"
> repeat with n = 10 to 35
>
> set the randomSeed to n
> put "0,0,0" into counters1
> get random(3)
> add 1 to item it of counters1
>
> set the randomSeed to n
> put "0,0,0" into counters2
> add 1 to item random(3) of counters2
>
> if counters1 is not counters2 then
> put n & tab & counters1 & tab & counters2 & lf after field "field"
> set the scroll of field "field" to 100000
> end if
>
> end repeat
> end mouseUp
>
> ==>
>
> 11 0,0,1 0,1,0
> 12 0,1,0 1,0,0
> 13 0,1,0 0,0,1
> 18 0,0,1 0,1,0
> 19 0,0,1 1,0,0
> 20 0,1,0 0,0,1
> 23 1,0,0 0,0,1
> 24 1,0,0 0,1,0
> 25 0,0,1 0,1,0
> 26 0,0,1 1,0,0
> 29 0,1,0 1,0,0
> 30 1,0,0 0,0,1
> 31 1,0,0 0,1,0
> 33 0,0,1 1,0,0
>
> This repeats with the same result every time (I'm setting randomSeed).
>
> Rev 2.7.1 OS X 10.4.6
>
> This looks a lot like the base64Decode bug that was fixed for 2.7.2.
>
> Dar Scott
>
More information about the use-livecode
mailing list