On Sun, 2007-01-21 at 22:40 -0700, J Pfersich wrote:
> st> var5 printString !
> '3/4'
> st> var5 storeOn: stdout !
> (Fraction numerator: 3 denominator: 3)Fraction new "<0x1057dc0>"
> st>
> The numerator is also used as the denominator.
heh :) See attachment. (Paolo: fixed in
[hidden email]--2007-nocandy/smalltalk--backstage--2.2--patch-4
"fix wrong varref in Fraction>>#storeOn:".)
> I also found that the class comment is inaccurate, the arithmatic operators
> do not answer a reduced fraction, the reduce private method is never accessed.
See the category 'arithmetic' method bodies.
st> ((3/4) * (2/3)) inspect!
An instance of Fraction
numerator: 1
denominator: 2
--
;;; Stephen Compall **
http://scompall.nocandysw.com/blog **
"Peta" is Greek for fifth; a petabyte is 10 to the fifth power, as
well as fifth in line after kilo, mega, giga, and tera.
-- Lee Gomes, performing every Wednesday in his tech column
"Portals" on page B1 of The Wall Street Journal
_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk