[GOODIE] Arithmetic assignments (+= and friends)

PhiHo Hoang phiho.hoang at rogers.com
Mon Jun 17 14:51:45 UTC 2002


Andreas,

> > This is cool. I did 4 'printit'. Is the last one 'a *= b'
> > expected ?
> >
> > a := 7 7
> > b := 5 5
> >
> > a += b 12
> > a *= b 35
>
> If I do the above in the order written I get 60 as the result of "a *= b";
> I only get 35 if I don't evaluate "a += b" before.

    Yes, I did the 4 'printIt' in order and got 35

> So, yes, that's what is expected.

    ... under 3.3 Alpha ;-)

    BTW, under 3.2 'whatever' (update # 4889) I got (surprise :-) what you
got !

    Also under 3.2, #=> (like in ' a => 7 ') was not understood.
    I would prefer #>=, though. :-)

     Cheers,

    PhiHo.





More information about the Squeak-dev mailing list