GetRangeCheck
Indicates if range checking is enabled.
Syntax
Section titled “Syntax”virtual bool GetRangeCheck() const abstract;Return value
Section titled “Return value”Returns true if range checking is enabled, otherwise false.
Example
Section titled “Example”The following example demonstrates use of the GetRangeCheck function.
HRESULT Acme4321::Configure(double Frequency, double Gain){ HRESULT hr = S_OK;
// Perform range checking before communicating with instrument if (GetRangeCheck()) { if (Frequency < 1.0E3 || Frequency > 1.0E12) return err.InvalidValue(_T("Frequency"), Frequency);
if (Gain < 0) return err.InvalidValue(_T("Gain"), Gain); }
hr = InstrPrintCommand();
return hr;}