public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE, ValueEval formVE) {int number = 0;try {ValueEval ve = OperandResolver.getSingleValue(numberVE, srcRowIndex, srcColumnIndex);number = OperandResolver.coerceValueToInt(ve);} catch (EvaluationException e) {return ErrorEval.VALUE_INVALID;}if (number < 0) {return ErrorEval.VALUE_INVALID;}if (number > 3999) {return ErrorEval.VALUE_INVALID;}if (number == 0) {return new StringEval("");}int form = 0;try {ValueEval ve = OperandResolver.getSingleValue(formVE, srcRowIndex, srcColumnIndex);form = OperandResolver.coerceValueToInt(ve);} catch (EvaluationException e) {return ErrorEval.NUM_ERROR;}if (form > 4 || form < 0) {return ErrorEval.VALUE_INVALID;}String result = this.integerToRoman(number);if (form == 0) {return new StringEval(result);}return new StringEval(makeConcise(result, form));}

public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE, ValueEval formVE){int number = 0;try{ValueEval ve = OperandResolver.GetSingleValue(numberVE, srcRowIndex, srcColumnIndex);number = OperandResolver.CoerceValueToInt(ve);}catch (EvaluationException){return ErrorEval.VALUE_INVALID;}if (number < 0){return ErrorEval.VALUE_INVALID;}if (number > 3999){return ErrorEval.VALUE_INVALID;}if (number == 0){return new StringEval("");}int form = 0;try{ValueEval ve = OperandResolver.GetSingleValue(formVE, srcRowIndex, srcColumnIndex);form = OperandResolver.CoerceValueToInt(ve);}catch (EvaluationException){return ErrorEval.NUM_ERROR;}if (form > 4 || form < 0){return ErrorEval.VALUE_INVALID;}String result = this.integerToRoman(number);if (form == 0){return new StringEval(result);}return new StringEval(MakeConcise(result, form));}
