What does "01" mean?

Noury Bouraqadi bouraqadi at ensm-douai.fr
Wed Jun 29 11:02:53 UTC 2005


Hi,

I inspected the result and noticed that the '01' is actually a 
LargePositiveInteger.
Then I used the 'normalize' message and got true for your expression

|r|
r := 501659.
(5 raisedTo: (r-1) modulo: r) normalize = 1
=>true

It would be nice that comparison primitives do automatically send 
normalize message.

Noury
Le 21 juin 05, à 07:03, Don McLane a écrit :

> 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
>
>
>
>
--------------------------------------------------------------
Dr. Noury Bouraqadi - Enseignant/Chercheur
Ecole des Mines de Douai - Dept. G.I.P
http://csl.ensm-douai.fr/noury

European Smalltalk Users Group Board
http://www.esug.org

Squeak: an Open Source Smalltalk
http://www.squeak.org
--------------------------------------------------------------





More information about the Squeak-dev mailing list