public Expr evaluate(Expr[] args) throws ExprException {
assertArgCount(args, 1);
if (args[0] instanceof ExprError) {
if (ExprError.NULL.equals(args[0])) {
return new ExprInteger(1);
} else if (ExprError.DIV0.equals(args[0])) {
return new ExprInteger(2);
} else if (ExprError.VALUE.equals(args[0])) {
return new ExprInteger(3);
} else if (ExprError.REF.equals(args[0])) {
return new ExprInteger(4);
} else if (ExprError.NAME.equals(args[0])) {
return new ExprInteger(5);
} else if (ExprError.NUM.equals(args[0])) {
return new ExprInteger(6);
} else if (ExprError.NA.equals(args[0])) {
return new ExprInteger(7);
}
}
return ExprError.NA;
}