XLL+ Class Library

COper::ToDouble() Example

//{{XLP_SRC(OperToDoubleExample)
    // NOTE - the FunctionWizard will add and remove mapping code here.
    //    DO NOT EDIT what you see in these blocks of generated code!
IMPLEMENT_XLLFN2(OperToDoubleExample, "RPA", "OperToDoubleExample"
    "", "Arg1,Strict", "Example", "Demonstrates COper::ToDouble()"
    "", "Argument 1\000If True, then do not attempt to"
    " convert\000", "\0\0", 1)

extern "C" __declspec( dllexport )
LPXLOPER OperToDoubleExample(const COper* lpopArg1, BOOL bStrict)
{
    CXlOper xloResult;
//}}XLP_SRC

    // Note that ToDouble() will assert (interrupting execution) 
    // if Strict is TRUE and Arg1 is not a number.

    // If this happens in the debugger, you can ignore the 
    // assertion and continue to step through your code.

    // In a real application, however, you should correct the bug 
    // as soon as possible by making sure that Arg1 is a double
    // or by turning Strict type-checking off.

    xloResult = lpopArg1->ToDouble(bStrict);
    return xloResult.Ret();
}

Uses

COper::ToDouble