Re: AS 1.6 Random Number Bug?
Re: AS 1.6 Random Number Bug?
- Subject: Re: AS 1.6 Random Number Bug?
- From: "Arthur J Knapp" <email@hidden>
- Date: Fri, 30 Mar 2001 10:36:29 -0500
>
Date: Thu, 29 Mar 2001 13:57:27 -0700
>
Subject: AS 1.6 Random Number Bug?
Sorry, I don't know about a bug in AS 1.6. I'm just replying
as a convenient excuse to show off the following pointless
handler:
(* A very simple random number generator that does
* not use any scripting addition commands.
*)
on rand(n, m)
set r to ""
repeat ("" & m)'s length times
set r to r & "0123456789"'s some item
end repeat
return ((0 + r) mod m) + n
end rand
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.LateNightSW.com