>>>>> "Jeffrey" == Jeffrey Straszheim <
[hidden email]> writes:
Jeffrey> So, I'm learning Smalltalk for the first time, and I have a very
Jeffrey> simple question regarding the precedence of the cascade operator.
Jeffrey> So, in this expression:
Jeffrey> self something: anObject selector ; anotherSelector.
Jeffrey> Is the target of *anotherSelector* anObject, or self?
The way to read ";" is that you're replacing the last message
send of what precedes it with what follows it. So let's see
the order there:
t1 := anObject selector.
t2 := self something: t1.
That should make sense. Now for the cascade... we do another
message send to whatever the most recent *receiver* was. In this
case, "self":
t3 := self anotherSelector.
And the overall value would be t3, if anyone looked at it.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<
[hidden email]> <URL:
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners