RosettaCodeData/Task/Copy-a-string/Arturo/copy-a-string.arturo

20 lines
312 B
Text
Raw Permalink Normal View History

2026-02-01 16:33:20 -08:00
a: "Hello"
2023-07-01 11:58:00 -04:00
b: a ; reference the same string
; changing one string in-place
; will change both strings
'b ++ "World"
print b
print a
c: "Hello"
d: new c ; make a copy of the older string
; changing one string in-place
; will change only the string in question
'd ++ "World"
print d
print c