[ENH] Magnitude >> ?

Brent Vukmer bvukmer at blackboard.com
Thu Feb 12 16:20:18 UTC 2004


I don't have time to package this nifty little suggested enhancement
from  Richard as a changeset, which is pretty funny since it's so small.
Please review anyway :)
 

-----Original Message-----
From: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of
Richard A. O'Keefe
Sent: Wednesday, February 11, 2004 6:31 PM
To: squeak-dev at lists.squeakfoundation.org
Subject: Re: Eiffel thoughts?

[Interesting Eiffel thoughts snipped]

"Example use of Magnitude >> ?"
 "Select and do-it:"
 "     |p|
       p := Pair first: -217 second: 'two hundred and seventeen'.
       Transcript print: p; cr; print: p ? p; cr"


  Magnitude >>? aMagnitude
      self < aMagnitude ifTrue: [^-1].
       aMagnitude < self ifTrue: [^1].
       ^0.






More information about the Squeak-dev mailing list