public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {int nInnerArgs = args.length-1; if (nInnerArgs < 1) {return ErrorEval.VALUE_INVALID;}final Function innerFunc;int functionCode = 0;try {ValueEval ve = OperandResolver.getSingleValue(args[0], srcRowIndex, srcColumnIndex);functionCode = OperandResolver.coerceValueToInt(ve);innerFunc = findFunction(functionCode);} catch (EvaluationException e) {return e.getErrorEval();}final List<ValueEval> list = new ArrayList<>(Arrays.asList(args).subList(1, args.length));Iterator<ValueEval> it = list.iterator();while(it.hasNext()) {ValueEval eval = it.next();if(eval instanceof LazyRefEval) {LazyRefEval lazyRefEval = (LazyRefEval) eval;if(lazyRefEval.isSubTotal()) {it.remove();}if (functionCode > 100 && lazyRefEval.isRowHidden()) {it.remove();}}}return innerFunc.evaluate(list.toArray(new ValueEval[0]), srcRowIndex, srcColumnIndex);}
public ValueEval Evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex){int nInnerArgs = args.Length - 1; if (nInnerArgs < 1){return ErrorEval.VALUE_INVALID;}Function innerFunc;try{ValueEval ve = OperandResolver.GetSingleValue(args[0], srcRowIndex, srcColumnIndex);int functionCode = OperandResolver.CoerceValueToInt(ve);innerFunc = FindFunction(functionCode);}catch (EvaluationException e){return e.GetErrorEval();}ValueEval[] innerArgs = new ValueEval[nInnerArgs];Array.Copy(args, 1, innerArgs, 0, nInnerArgs);return innerFunc.Evaluate(innerArgs, srcRowIndex, srcColumnIndex);}