[squeak-dev] Bibi, a Scratch port to recent Squeak

Stéphane Rollandin lecteur at zogotounga.net
Wed Feb 20 22:15:22 UTC 2013


Ah, ok, then it has just been changed in the Scratch image (more exactly 
the BYOB 1.3 image I'm working from, I don't know about Scratch per se), 
were the implementation is:

/ 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: [^ self asFloat / aNumber]].
  ^ aNumber adaptToInteger: self andSend: #/


Stef


More information about the Squeak-dev mailing list