[squeak-dev] Bibi, a Scratch port to recent Squeak
Bob Arning
arning315 at comcast.net
Wed Feb 20 21:30:41 UTC 2013
Never? My 2.8 image has
/ aNumber
"Refer to the comment in Number / "
| quoRem |
aNumber isInteger ifTrue:
[quoRem _ self digitDiv: aNumber abs "*****I've added abs
here*****"
neg: self negative ~~ aNumber negative.
(quoRem at: 2) = 0
ifTrue: [^ (quoRem at: 1) normalize]
ifFalse: [^ (Fraction numerator: self denominator: aNumber)
reduced]].
^ aNumber adaptToInteger: self andSend: #/
which will return a fraction if needed.
Cheers,
Bob
On 2/20/13 3:26 PM, Stéphane Rollandin wrote:
> since in Squeak 2.8 Integer>>#/ never returns a Fraction;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130220/3bda8363/attachment.htm
More information about the Squeak-dev
mailing list
|