You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Couldn't find anything about this - but is there a support for named optional arguments in function calls?
Here is something I'm trying to do:
public class Program
{
public class Ctx
{
public double Subtract(double x = 0, double y = 1)
{
return x - y;
}
}
public static void Main()
{
ExpressionEvaluator evaluator = new ExpressionEvaluator();
evaluator.Context = new Ctx();
string expression = "Subtract(y:2)";
Console.WriteLine(expression);
Console.WriteLine(evaluator.Evaluate(expression));
Console.WriteLine(string.Empty);
}
}
So I'd expect to be able to use named argument just like in C#, is there a support for that? If no, do you have any plans for implementing it?
Thank you.
The text was updated successfully, but these errors were encountered:
Hello @ko-vasilev. Thanks for this issue.
For now named arguments are not supported.
I think it could be nice to have.
I am on vacation for the next 2 weeks.
I will look how to implement it when I come back.
Hello,
Couldn't find anything about this - but is there a support for named optional arguments in function calls?
Here is something I'm trying to do:
So I'd expect to be able to use named argument just like in C#, is there a support for that? If no, do you have any plans for implementing it?
Thank you.
The text was updated successfully, but these errors were encountered: