[Newbies] Re: Adding method to Smallinteger class
noobie
pntball650 at aol.com
Fri Apr 23 20:54:10 UTC 2010
I was just looking at the method
gcd: anInteger
"See SmallInteger (Integer) | gcd:"
| n m |
n := self.
m := anInteger.
[n = 0]
whileFalse:
[n := m \\ (m := n)].
^ m abs
the best thing i can think to do would be ......would this work
larger: anInteger
| n m |
n := self.
m := anInteger.
n > m [^n].
m>n [^m].
--
View this message in context: http://forum.world.st/Adding-method-to-Smallinteger-class-tp2062877p2062915.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
More information about the Beginners
mailing list