[BUG][FIX] -5 atRandom does bad things
Doug Way
dway at riskmetrics.com
Mon Aug 27 02:13:21 UTC 2001
Don't forget the [FIX] tag when posting a fix, so that it will show up
in Bert's SQFIXES site, which is where fixes are reviewed for inclusion
in the base image.
Interesting bug, btw. :)
- Doug Way
dway at riskmetrics.com
On Sunday, August 26, 2001, at 06:46 PM, David N. Smith (IBM) wrote:
> Hi:
>
> Try:
>
> (1 to: 100) collect: [ :n | -5 atRandom ]
>
> and you get something like this:
>
> #(-3 -1 -3 -2 -2 0 1 1 -3 0 -1 -1 1 1 1 0 1 -2 0 1 -2 0 0 -3 1 1 -3 1 1
> 1 0 0 -3 1 -2 1 -1 0 -3 -2 -3 -1 0 -1 0 -1 -3 0 -2 -2 -3 -3 -3 -2 -2 0
> 1 -1 1 -2 -2 -3 -2 0 -2 1 -1 -3 1 0 -3 0 0 1 -1 -2 -3 -2 -3 0 -3 0 0 -3
> 1 -2 0 0 -3 -2 -3 -1 0 0 -2 -3 -1 -2 -2 1)
>
> Note that the range is -3 to 1. Note also that the comments indicate
> that this is an invalid use of atRandom. A fix is attached.
>
> Dave
<Attachment missing>
-------------- next part --------------
Skipped content of type multipart/mixed
More information about the Squeak-dev
mailing list
|