This is because of the Architecture of Smalltalk ...
It is always so in Smalltalk that you send an message to an object .. When you do the following
b := 0 - a.
You send the message '-' to the object 0. The parameter of the message is A.
These are called binary messages. When you have
b := - a
You don't have an object where you send your message to. Again like I said before when you do a negated you send the message negated to the object a. I hope you understand it if you don't ask again and I'll try to explain better
Greetz
-----Oorspronkelijk bericht----- Van: beginners-bounces@lists.squeakfoundation.org [mailto:beginners-bounces@lists.squeakfoundation.org] Namens Edgar J. De Cleene Verzonden: donderdag 10 mei 2007 19:34 Aan: A friendly place to get answers to even the most basic questions about Squeak. Onderwerp: Re: [Newbies] [Q] A really silly question
El 5/10/07 2:22 PM, "Rob Van Pamel" rob.vanpamel@telenet.be escribió:
To get the negative of a value use
a negated.
Greetz Rob
Yes, I know that. What I ask is why you could't do b := - a.
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners