Skip to main content

Copy-Data

Command Description

Copy data. Can be used to copy a dictionary or an array

Command Prototype

varRet = Clone(varData)

Parameter Description

ParameterRequiredTypeDefaultDescription
varDataTrueexpression$PrevResultThe data to be copied

return

varRet,The variable used to save the output of the command.

Demo

TracePrint("--------------------------Copy data------------------- ------------") 
//-----------------------------------------------------------------------
//[Remarks] Copy data, which can be used to copy arrays and dictionaries
//Input parameter 1:
// varData----->The data you want to copy
//out parameters:
// Copyed data
a = [1,2,3]
varRet = Clone(a)
TracePrint("The other array a is [1, 2, 3], and it is assigned to varRet after copying, and the value of varRet is: ")
TracePrint(varRet)