RosettaCodeData/Task/Copy-a-string/Phix/copy-a-string.phix

6 lines
241 B
Plaintext

string this = "feed"
string that = this -- (that becomes "feed", this remains "feed")
that[2..3] = "oo" -- (that becomes "food", this remains "feed")
this[1] = 'n' -- (that remains "food", this becomes "need")
?{this,that}