Random sort demonstration

Jerry Jensen jhj at jhj.com
Thu May 23 20:56:11 EDT 2013

I disagree with Jerry here. Using random(20) for sorting would give a different order with "numeric" vs. without, all else being equal, but it would still be just as random. Just because most of the random(20) results start with the character "1" doesn't mean they aren't unique or that they are more likely.

So using "numeric" is different but just as bad. A big number is still the best idea, if not so pretty.

How about if random() with no parameter returned an integer between 1 and the maximum integer? It might be different on different platforms, but still the best that can be done.


On May 23, 2013, at 11:14 AM, Jerry Jensen <jhj at jhj.com> wrote:

> Thanks for pointing that out! I've got some checking to do of old code.
> Imagine the weighting that would be caused by random(20)...
> .Jerry
> On May 23, 2013, at 9:37 AM, Robert Brenstein <rjb at robelko.com> wrote:
>> I wonder why nobody suggests adding "numeric" parameter to random sorts like above. After all, the sort column is a number but without that parameter is sorted as ascii text not numeric value.
>> Robert
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

More information about the use-livecode mailing list