Re: processing time & stack overflow
Re: processing time & stack overflow
- Subject: Re: processing time & stack overflow
- From: Paul Skinner <email@hidden>
- Date: Tue, 28 Aug 2001 11:49:23 -0400
on 8/28/01 11:05 AM, Arthur J Knapp wrote:
>
on NewOrder(lst)
>
set {s1, s2, len} to ,
>
{random number from 1 to 100000, 31415, lst's length}
>
repeat with i from 1 to len
>
set {j, s1} to {(s1 mod len) + 1, (s1 * s2) mod len}
>
set {lst's item i, lst's item j} to ,
>
{lst's item j, lst's item i}
>
end repeat
>
end NewOrder
>
>
set lst to {"a", "b", "c", "d"}
>
>
NewOrder(lst)
>
Nice. I'm still digesting it. You do want to return the value of 'lst'
at the end though.
I don't see any OSAX calls. Was that in the previous version you mention?
--
"Ah! How sweet coffee tastes! Lovelier than a thousand kisses, sweeter far
than muscatel wine! I must have coffee..." -- J. S. Bach