public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE) { String octal = OperandResolver.CoerceValueToString(numberVE); try { return(new NumberEval(BaseNumberUtils.ConvertToDecimal(octal, OCTAL_BASE, MAX_NUMBER_OF_PLACES))); } catch (ArgumentException) { return(ErrorEval.NUM_ERROR); } }
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE) { String hex; if (numberVE is RefEval) { RefEval re = (RefEval)numberVE; hex = OperandResolver.CoerceValueToString(re.GetInnerValueEval(re.FirstSheetIndex)); } else { hex = OperandResolver.CoerceValueToString(numberVE); } try { return(new NumberEval(BaseNumberUtils.ConvertToDecimal(hex, HEXADECIMAL_BASE, MAX_NUMBER_OF_PLACES))); } catch (ArgumentException) { return(ErrorEval.NUM_ERROR); } }