internal void Check()
{
Function f = funcs[info];
if (this.info < 0)
{
throw ExprException.UndefinedFunction(this.name);
}
if (funcs[info].IsVariantArgumentList)
{
// for finctions with variabls argument list argumentCount is a minimal number of arguments
if (argumentCount < funcs[info].argumentCount)
{
// Special case for the IN operator
if (funcs[this.info].id == FunctionId.In)
{
throw ExprException.InWithoutList();
}
throw ExprException.FunctionArgumentCount(this.name);
}
}
else
{
if (argumentCount != funcs[info].argumentCount)
{
throw ExprException.FunctionArgumentCount(this.name);
}
}
}