Пример #1
0
        private static double invokeAndDereference(ValueEval[] args)
        {
            ValueEval ve = FUNC_INST.Evaluate(args, -1, -1);

            ve = WorkbookEvaluator.DereferenceResult(ve, -1, -1);
            Assert.AreEqual(typeof(NumberEval), ve.GetType());
            return(((NumberEval)ve).NumberValue);
        }
Пример #2
0
 private static ValueEval EvaluateInternal(ValueEval arg, ValueEval iferror, int srcCellRow, int srcCellCol)
 {
     arg = WorkbookEvaluator.DereferenceResult(arg, srcCellRow, srcCellCol);
     if (arg is ErrorEval)
     {
         return(iferror);
     }
     else
     {
         return(arg);
     }
 }
Пример #3
0
 private static ValueEval EvaluateInternal(ValueEval arg, ValueEval iferror, int srcCellRow, int srcCellCol)
 {
     arg = WorkbookEvaluator.DereferenceResult(arg, srcCellRow, srcCellCol);
     if (arg is ErrorEval)
     {
         //if the 2nd argument is missing, use an empty string as default
         if (iferror is MissingArgEval)
         {
             return(new StringEval(string.Empty));
         }
         else
         {
             return(iferror);
         }
     }
     else
     {
         return(arg);
     }
 }