Random algorithm

Dave Cragg dave.cragg at lacscentre.co.uk
Thu Nov 13 05:20:34 EST 2008


On 13 Nov 2008, at 07:36, Malte Brill wrote:
>
> on each run of the following script:
>
> on mouseUp pMouseBtnNo
>    repeat with i= 2130706432 to 2130706442
>        set the randomseed to i
>        put random(34) & cr after fld 1
>    end repeat
> end mouseUp


Malte

It looks like the limit is 2^31 -- 2147483648

This returns 23 on each line after the first 2:

on mouseUp

    put empty into field 1

    repeat with i= 2147483646 to 2147483656
        set the randomseed to i
        put random(34) & cr after fld 1
    end repeat


end mouseUp




More information about the use-livecode mailing list