.
is a separator
expression1.
expression2.
expression3
Example
Transcript cr.
Transcript show: 1.
Transcript show: 2
.
is a separator, not a terminator | macNode pcNode |
macNode := Workstation withName: #mac.
macNode sendPacket: 'Hello World'
Transcript cr.
Transcript show: 1.
Transcript show: 2
is equivalent to:
Transcript
cr ;
show: 1 ;
show: 2
;
is called a cascadeSending Multiple Messages to an Object
| c |
c := OrderedCollection new.
c add: 1.
c add: 2
is equivalent to:
OrderedCollection new
add: 1 ;
add: 2
add: 2
is sent to the receiver of message add: 1
OrderedCollection
.
is a separator;
(cascade) is useful to avoid repeating the receiver/