NEWBIE Question: == vs =?

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Wed Jan 24 20:07:54 UTC 2001


On Wed, 24 Jan 2001, Phuong Bui wrote:

> What exactly is the difference between the two boolean mesages: #== and #= ? 

#== means "one and the same object", "identity"
#= means "equal", "equality"

> Can someone give an example where #== results in true but not #= ?
> (and vice versa?)

No, identity always means equality, because the same object should be
equal to itself. But the other way around does not hold:

	| a b |
	a := 'Squeak'.
	b := a copy.
	{ a == b. a = b }

-- Bert





More information about the Squeak-dev mailing list