copy (2)
print-it: func [/local str] [
str: ""
insert str "ha"
print str
]
print-it
ha
print-it
haha
print-it
hahaha
When initializing a string or block series, use copy
on the value to make is a unique series. In this example, because copy
wasn’t used, the empty string series is modified with every call of print-it
.
print-it: func [/local str] [
str: copy ""
insert str "ha"
print str
]
print-it
ha
print-it
ha
print-it
ha