copy_<name>
copy_<name>(r_defstruct) =>r_defstruct
Description
Creates and returns a copy of a structure. This function is created by the defstruct function where name is the name of the defstruct.
Structures can contain instances of other structures; therefore you need to be careful about structure sharing. If sharing is not desired, use the copyDefstructDeep function to generate a copy of the structure and its sub-elements.
Arguments
Value Returned
Examples
defstruct(myStruct a b c)
=> t
m1 = _myStruct(?a 3 ?b 2 ?c 1)
=> array[x]:xxxx
m2 = copy_myStruct(m1)
=> array[x]:xxxx
Related Topics
Return to top