Wait, that's not a feature. Was: What does "01" mean?
Don McLane
dmclane at u.washington.edu
Tue Jun 21 23:43:34 UTC 2005
Everyone's done a great job on Squeak, I'm not criticizing. But this
stuff about needing to 'normalize' a Large...Integer before comparing
seems dangerous. It appears as though integers can be magically coerced
into LargeIntegers (which is nice), but if you don't expect it, it can
be quite surprising. Surprises should be minimized.
I've only be using Squeak for a couple weeks, so I'm not comfortable
trying to fix this myself.
Don
Don McLane wrote:
> Never mind! I discovered "normalize". Thanks.
>
> Don
>
> Don McLane wrote:
>
>> This is a new-user question. I'm typing things in a workspace and
>> sending them to the transcript (and, as it turns out, learning to use
>> the debugger). I decided to challenge myself by reviewing some
>> discrete mathematics. So one statement read:
>>
>> (5 raisedTo: (r-1) modulo: r) = 1 ifFalse: [successFlag := false].
>>
>> where r was big (in one of my tests it was 501659). The debugger
>> reported that the left hand side of the '=' sign evaluated to
>> "01"--what does the leading '0' mean? Why does the equality test
>> fail? Am I crazy?
>>
>> Thanks,
>> Don
>>
>>
>
>
More information about the Squeak-dev
mailing list
|