Hi Ben, Have a look at the method for yourself. Check out the method = on the instance side of String.
It should be pretty obvious when you get to the actual string comparison. All the best, Ron Teitelbaum > -----Original Message----- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Ben Coman > Sent: Saturday, January 07, 2012 12:15 AM > To: A friendly place to get answers to even the most basic questions about > Squeak. > Subject: [Newbies] Testing = and == in workspace > > I was trying to confirm the operation of = and == in the workspace by > executing the following code.. > > x := 'xxx'. > y := 'xxx'. > z := x. > (OrderedCollection new) add: (x = y) ; add: (x == y) ; add: (x=z); add: > (x==z); yourself. > > I was confused that I was getting anOrderedCollection(true true true true) > > It was not until I changed to the following code... > > x := String newFrom: 'xxx'. > y := String newFrom: 'xxx'. > z := x. > (OrderedCollection new) add: (x = y) ; add: (x == y) ; add: (x=z); add: > (x==z); yourself. > > that I got the expected anOrderedCollection(true false true true) > > I was curious what was going on in the first case. > > cheers, Ben > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners