use-revolution Digest, Vol 16, Issue 91

D.Rothe drothe at optusnet.com.au
Fri Jan 28 01:34:53 EST 2005


THANX TO ALL WHO REPLIED!


Jim definately has the solution for chosing one solution, but i thought I'd
add a bit to it ;?)

if tHairInKeyboard > 1 then
> put "all solutions" into x
> sort items of "all ten solutions" by random(10000)
> return item 1 of x
else put tStrongCoffee & tSugar into tCup

Thanx to all and Best Regards!

> >Subject: Re: Random #'s
> >To: How to use Revolution <use-revolution at lists.runrev.com>
> >Message-ID: <BED5B8C6-70B1-11D9-BE1B-000A9567A3E6 at swcp.com>
> >Content-Type: text/plain; charset=US-ASCII; format=flowed
> >
> >
> >On Jan 27, 2005, at 2:31 AM, D.Rothe wrote:
> >
> >>  How can I include only unique numbers?
> >
> >Here is an interesting variation:
> >
> >on mouseUp
> >    put rlist()
> >end mouseUp
> >
> >function rlist
> >    put "1,2,3,4,5,6,7,8,9,10" into x
> >    sort items of x by random(10000)
> >    return item 1 to 6 of x
> >end rlist
> >
> >Dar
>
> I confess, I never understood this.
>
> And I can't imagine how Dwayne will choose among the multitude of
> solutions proposed. Maybe:
>
> put "all solutions" into x
> sort items of "all ten solutions" by random(10000)
> return item 1 of x
>
>
> Jim
> ============================================



More information about the Use-livecode mailing list