Copy a string: Difference between revisions

Content deleted Content added
Line 312: Line 312:
str2 = copy str1
str2 = copy str1
</pre>
</pre>

=={{header|Metafont}}==

Metafont will always copy a string (does not make references).

<lang metafont>string s, a;
s := "hello";
a := s;
s := s & " world";
message s; % writes "hello world"
message a; % writes "hello"
end<lang>


=={{header|Modula-3}}==
=={{header|Modula-3}}==