Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Copy-a-string/Picat/copy-a-string.picat
Normal file
16
Task/Copy-a-string/Picat/copy-a-string.picat
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue