Example #1
0
types::Function::ReturnValue sci_exists(types::typed_list &in, int _iRetCount, types::typed_list &out)
{
    types::Function::ReturnValue retVal = isdef(in, _iRetCount, out, "exists");

    if (retVal == types::Function::OK)
    {
        types::Bool* pBOut = out[0]->getAs<types::Bool>();
        types::Double* pDblOut = new types::Double(pBOut->getDims(), pBOut->getDimsArray());
        for (int i = 0; i < pBOut->getSize(); i++)
        {
            pDblOut->set(i, (double)pBOut->get(i));
        }

        pBOut->killMe();
        out.pop_back();
        out.push_back(pDblOut);
    }

    return retVal;
}