internal override void Bind(DataTable table, ArrayList list)
{
this.Check();
// special case for the Convert function bind only the first argument:
// the second argument should be a COM+ data Type stored as a name node, replace it with constant.
if (funcs[info].id == FunctionId.Convert)
{
if (argumentCount != 2)
{
throw ExprException.FunctionArgumentCount(this.name);
}
arguments[0].Bind(table, list);
if (arguments[1].GetType() == typeof(NameNode))
{
NameNode type = (NameNode)arguments[1];
arguments[1] = new ConstNode(ValueType.Str, type.name);
}
arguments[1].Bind(table, list);
}
else
{
for (int i = 0; i < argumentCount; i++)
{
arguments[i].Bind(table, list);
}
}
}