(No Subject)
Chris Cunningham
csque0 at lycos.com
Wed Feb 4 22:35:25 UTC 2004
>> I'm writting a little app where I want to write out
>> (in readable format) a fraction, and then later
>> read it back in. At first, I thought I'd try
>> converting the fraction to a string, and just write
>> that out. Later, I would get that string, and just
>> send it #asNumber. Interestingly, this doesn't work.
>> So:
>> (1/24) asString asNumber
>> returns an error (At least one digit expected
>> here). This is because the #asString puts
>> parenthesis around the string.
...
>> For now, I will either create a new flavor of
>> Float>>readFrom: to handle the ()'s around the
>> number, or hack the current version in Float to
>> read this. I'd be more than happy to modify
>> Float>>readFrom: to take read this in and post it
>> as a [enh] if it is desired - I'm just not sure
>> that this is really the desired behaviour.
What I really meant to say here was Fraction - not Float.
-Chris
____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005
More information about the Squeak-dev
mailing list
|