CImSynthInfo:new


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

Syntax

S = CImSynthInfo:new()

S = CImSynthInfo:new( CImSynthInfo2 )

where

    If no argument is specifies, a default CImSynthInfo object is created and initialized to default properties.

    CImSynthInfo2 is an existing CImSynthInfo object whose properties are copied to the new object.

    S is a new CImSynthInfo object. On failure, nil is returned..

  

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

Example

The following script illustrates using the 2 constructors. The first example fills the CImSynthInfo table with default parameters. The second example copies the first object and then changes the readout noise property. The default value of nReadNoise is 10.0.

S1 = CImSynthInfo:new()

-- create a default CImSynthInfo S1

S2 = CImSynthInfo:new( S1 )

-- copy S1 to a new CImSynthInfo S2

S2.nReadNoise = 8.4

-- change the readout noise of S2

Printf("S1 noise = %lg", S1.nReadNoise )

-- result: C1 noise = 10

Printf("S2 noise = %lg", S2.nReadNoise )

-- result: C2 noise = 8.4

Related Topics

delete

CImSynthInfo properties

CImSynthInfo class