User Tools

Site Tools


4rpl:commands:deepcopy

Index

DeepCopy

DeepCopy ( <-var) ->deepCopiedVar

Description

Creates a copy of the item on the stack with the same contents. Unlike 'Copy', if the copied item is a table or list and contains other lists or tables, those lists and tables will be copied as well (etc, etc).

Examples

Split("A,B,C" ",") ->listInner
Split("1,2,3,4,5,6" ",") ->list
<-list <-listInner AppendToList
 
<-list Copy ->listCopy
<-list DeepCopy ->listDeepCopy
SetListElement(<-listInner 0 "banana")
SetListElement(<-list 0 "orange")
 
Trace(<-list)
Trace(<-listCopy)
Trace(<-listDeepCopy)

Index

4rpl/commands/deepcopy.txt · Last modified: 2021/01/08 11:01 by 127.0.0.1