Random sort demonstration

Dick Kriesel dick.kriesel at mail.com
Thu May 23 04:24:03 EDT 2013


On May 23, 2013, at 12:41 AM, Jacques Hausser <jacques.hausser at unil.ch> wrote:

> and something like
> 
> "scramble lines of myVar", instead of "sort lines of myVar random(xxx)". Could be a command using the same function behind the scene, with the max integer as parameter to avoid prevalence of "the first" in the case of repetitions. And it is semantically clearer than "sort random".


Good idea, Jacques.  How about this?

command shuffle @rLines
    sort rLines by random( 4294967295 ) -- note:  2^32-1
end shuffle

-- Dick





More information about the use-livecode mailing list