private void ValidateNumArgs(int numArgs, FunctionMetadata fm) { if (numArgs < fm.MinParams) { String msg = "Too few arguments to function '" + fm.Name + "'. "; if (fm.HasFixedArgsLength) { msg += "Expected " + fm.MinParams; } else { msg += "At least " + fm.MinParams + " were expected"; } msg += " but got " + numArgs + "."; throw new FormulaParseException(msg); } if (numArgs > fm.MaxParams) { String msg = "Too many arguments to function '" + fm.Name + "'. "; if (fm.HasFixedArgsLength) { msg += "Expected " + fm.MaxParams; } else { msg += "At most " + fm.MaxParams + " were expected"; } msg += " but got " + numArgs + "."; throw new FormulaParseException(msg); } }
/* package */ public FunctionMetadataRegistry(FunctionMetadata[] functionDataByIndex, Hashtable functionDataByName) { _functionDataByIndex = functionDataByIndex; _functionDataByName = functionDataByName; }
private FuncPtg(int funcIndex, FunctionMetadata fm): base(funcIndex, fm.ReturnClassCode, fm.ParameterClassCodes, fm.MinParams) // minParams same as max since these are not var-arg funcs { { }