Copy a string: Difference between revisions

Content deleted Content added
About copying vs referencing
No edit summary
Line 144: Line 144:
var dst = src;
var dst = src;


==[[Lisp]]==
[[Category:Lisp]]
(setf orig "Hello")
(setf copied (copy-seq orig))

test the copy:
(equalp orig copied)
t
(eq orig copied)
nil
==[[Perl]]==
==[[Perl]]==
[[Category:Perl]]
[[Category:Perl]]