• 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: Bug in StandardAdditions dictionary.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in StandardAdditions dictionary.


  • Subject: Re: Bug in StandardAdditions dictionary.
  • From: Nigel Garvey <email@hidden>
  • Date: Fri, 8 Aug 2003 20:20:37 +0100

Emmanuel wrote on Fri, 8 Aug 2003 01:14:47 -0700:

>Serge Segu has noticed a small bug that I don't remember having seen
>mentioned here.
>
>StandardAdditions dictionary says:
>
>random number : Generate a random number
> random number [ number] -- the upper limit; if not specified, result is a
>real between 0 and 1
> [from number] -- the lowest number to return
> [to number] -- the greatest number to return (up to but not including)
>
>The last sentence should read "up to, including".

It's the same in the "Standard Additions" dictionaries with OS 8.6 and
9.2.2, which also fail to mention that:

1) random number [negative number] gives a result whose *lower* limit
is the amount of the parameter - the upper being 0.

2) In the expression 'random number from a to b', it really doesn't
matter whether a or b is the lower number. 'random number from b to a'
produces the same result.

3) If one of the parameters is a real, the result will be a real.

4) 'a + (random number (b - a))' is faster than 'random number from a
to b'. Again, a and b are interchangeable.

NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Bug in StandardAdditions dictionary.
      • From: John Delacour <email@hidden>
  • Prev by Date: Script Debugger 4 and Mac OS 9?
  • Next by Date: Re: Opening a shared FM database (was Re: A Script)
  • Previous by thread: Script Debugger 4 and Mac OS 9?
  • Next by thread: Re: Bug in StandardAdditions dictionary.
  • Index(es):
    • Date
    • Thread