XLL+ Class Library

COper::operator double() Example

//{{XLP_SRC(OperCastToDoubleExample)
    // NOTE - the FunctionWizard will add and remove mapping code here.
    //    DO NOT EDIT what you see in these blocks of generated code!
IMPLEMENT_XLLFN2(OperCastToDoubleExample, "RP", "OperCastToDouble"
    "Example", "Arg1", "Example", "Demonstrates casting a COper t"
    "o a double", "Argument 1\000", "\0", 1)

extern "C" __declspec( dllexport )
LPXLOPER OperCastToDoubleExample(const COper* lpopArg1)
{
    CXlOper xloResult;
//}}XLP_SRC

    BOOL bOk = TRUE;
    
    // These two lines could have condensed to one:
    // xloResult = (double)opArg1;
    double d = *lpopArg1;
    xloResult = d;

    return xloResult.Ret();
}

Uses

COper::operator double