• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AS 1.6 Random Number Bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Upgraded to AS 1.6 now problems...
  • Next by Date: Re: osascript from the terminal: error?
  • Previous by thread: AS 1.6 Random Number Bug?
  • Next by thread: RE: Using PhotoScripter
  • Index(es):
    • Date
    • Thread