User Tools

Site Tools


prpl:deepcopylist

<- PRPL reference <- Lists

DeepCopyList

ArgumentsResultNotation
original copy [ list - list ]

Description

Creates a copy of a list with the same contents. Unlike CopyList, if the copied list contains other lists, those lists will be copied as well (and if those lists contain other lists, even those will be copied, etc, etc). See Copy vs Deep Copy for more info.

Examples

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

Trace(<-list) 
Trace(<-listCopy) 
Trace(<-listDeepCopy) 
prpl/deepcopylist.txt · Last modified: 2017/08/30 14:06 by kajacx