internal void Check()
{
Function f = s_funcs[_info];
if (_info < 0)
{
throw ExprException.UndefinedFunction(_name);
}
if (s_funcs[_info]._isVariantArgumentList)
{
// for finctions with variabls argument list argumentCount is a minimal number of arguments
if (_argumentCount < s_funcs[_info]._argumentCount)
{
// Special case for the IN operator
if (s_funcs[_info]._id == FunctionId.In)
{
throw ExprException.InWithoutList();
}
throw ExprException.FunctionArgumentCount(_name);
}
}
else
{
if (_argumentCount != s_funcs[_info]._argumentCount)
{
throw ExprException.FunctionArgumentCount(_name);
}
}
}