Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 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