16 lines
245 B
Text
16 lines
245 B
Text
go =>
|
|
S1 = "string",
|
|
println(s1=S1),
|
|
S2 = S1,
|
|
S2[1] := 'x', % also changes S1
|
|
println(s1=S1),
|
|
println(s2=S2),
|
|
nl,
|
|
|
|
S3 = "string",
|
|
S4 = copy_term(S3),
|
|
S4[1] := 'x', % no change of S3
|
|
println(s3=S3),
|
|
println(s4=S4),
|
|
|
|
nl.
|