CImCombine:Copy
The Copy method duplicates the current CImCombine and returns the new object.
C = CImCombine:Copy() |
C is a new CImCombine object containing the same values as the current one.In place of CImCombine:, use the name of the object to be copied.
This method copies an existing CImCombine and returns a reference to the new CImCombine. You cannot copy a CImCombine or other class object using the trivial statement B = A, as this simply makes the value of B a reference to the object A. In other words, B becomes an alias to A. To get around this, two copy methods are provided by the CImCombine class:
To create a CImCombine that is a copy of the current object, use the Copy method. This creates a new CImCombine B before duplicating the values of the current object A. For example,
|
-- CImCombine A already exists |
To create a new CImCombine that is a copy of an existing object, use the copy constructor, as in
|
-- CImCombine A already exists |
You can use the copying syntax that fits best with your script.
The following script duplicates the CImCombine C into a new CImCombine C2:
|
-- create a CImCombine |
|
-- set some members |
|
-- creates a duplicate CImCombine A2 |
|
-- result: verbose = 1 |
|
-- if finished with A, clean up memory |
CImCombine class, new, SaveState
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.