Copy a string: Difference between revisions

Content added Content deleted
No edit summary
(add BQN)
Line 470: Line 470:
?(^same$+5) = ?(^source$+5)
?(^same$+5) = ?(^source$+5)
PRINT same$</lang>
PRINT same$</lang>

=={{header|BQN}}==
BQN strings are character arrays. Like all other types of arrays, they are immutable.

String copying in BQN is left to be defined by the implementation, but [[CBQN]] and [[mlochbaum/BQN]](main implementations) copy only the reference until the original source is modified.
<lang bqn>a ← "Hello"
b ← a
•Show a‿b
a ↩ "hi"
•Show a‿b</lang><lang bqn>⟨ "Hello" "Hello" ⟩
⟨ "hi" "Hello" ⟩</lang>


=={{header|Bracmat}}==
=={{header|Bracmat}}==