RosettaCodeData/Task/Copy-a-string/Smalltalk/copy-a-string.st
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

7 lines
196 B
Smalltalk

|s1 s2|
"bind the var s1 to the object string on the right"
s1 := 'i am a string'.
"bind the var s2 to the same object..."
s2 := s1.
"bind s2 to a copy of the object bound to s1"
s2 := (s1 copy).