CStats:GetErrMsg CStats:Kurtosis

CStats:GetStatus


The GetStatus method returns a status for the last statistics calculation. A value of 0 indicates success and other values correspond to an error condition.

Syntax

sMsg = CStats:GetErrMsg()

bullet.gif    Returns 0 if the last statistics calculation succeeded.

bullet.gif    Otherwise, returns an error code.

Remarks

The CStats calculations return a value and not an error message. If you wish to check the result of a calculation, call this method to get the status code. if the status code is not 0, you can fetch the error message using GetErrMsg. Note:This method also returns 0 if there is no CStats object.

Example

The following script checks the MinMaxClipMean calculation for success and prints an error message if it failed:

 

S = new_stats()

-- create a CStats object

S:Init( I, R )

-- specify CImage and CRect to measure

nVal = S:MinMaxClipMean()

-- returns the mean value

if S:GetStatus() then

-- if calculation failed, this returns nonzero

  Msg( S:GetErrMsg() )

-- show the error message

end

 

Related Topics

CStats class, GetErrMsg


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.