RosettaCodeData/Task/Copy-a-string/Logo/copy-a-string.logo

11 lines
283 B
Plaintext

make "a "foo
make "b "foo
print .eq :a :b ; true, identical symbols are reused
make "c :a
print .eq :a :c ; true, copy a reference
make "c word :b "|| ; force a copy of the contents of a word by appending the empty word
print equal? :b :c ; true
print .eq :b :c ; false