CImCombine:new


The new method constructs a new instance of a CImCombine object. Two different constructor overloads are available to create a new CImCombine and initialize the properties.

Syntax

C = CImCombine:new()

C = CImCombine:new( CImCombine2 )

where

    The first form creates a default CImCombine object with properties initialized to default values.

    CImCombine2 is an existing CImCombine object whose properties are copied to the new object.

    C is the new CImCombine object. On failure, nil is returned.

  

Two overloads are provided for the CImCombine class. They create a default CImCombine and a copy of a CImCombine. If you pass something other than nil or another CImCombine—such as a string—then the default constructor is used.

Example

The following script illustrates using the 2 constructors. All produce the same result:

C1 = CImCombine:new()

-- create CImCombine C1 and initialize

C1:SetVerbose(true)

-- enable verbose listing of results

C2 = CImCombine:new( C1 )

-- copy C1 to a new CImCombine C2

Printf("C1 verbose = %d",C1.bVerbose)

-- result: C1 sign = 1

Printf("C2 verbose = %d",C2.bVerbose)

-- result: C2 sign = 1

Related Topics

delete

CImCombine class