We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I just wanted to get to know if it is possible to get the evaluated expression as a string.
ValueA = 10 ValueB = 15
For example: [ValueA] + [ValueB] Results in: "10 + 15"
This can be really helpful if you want to track down the calculation to see what happened there.
The text was updated successfully, but these errors were encountered:
There is no ready-made function for it, but you can achieve this by implementing a https://github.com/ncalc/ncalc/blob/master/src/NCalc/Domain/LogicalExpressionVisitor.cs that does it. You could take most of https://github.com/ncalc/ncalc/blob/master/src/NCalc/Domain/SerializationVisitor.cs but modify Visit(Identifier) to evaluate the parameter and add that to the string instead. The parameter evaluation can be based on the corresponding code in the evaluation visitor: https://github.com/ncalc/ncalc/blob/master/src/NCalc/Domain/EvaluationVisitor.cs#L663-L700
Visit(Identifier)
Sorry, something went wrong.
No branches or pull requests
Hello,
I just wanted to get to know if it is possible to get the evaluated expression as a string.
ValueA = 10
ValueB = 15
For example: [ValueA] + [ValueB]
Results in: "10 + 15"
This can be really helpful if you want to track down the calculation to see what happened there.
The text was updated successfully, but these errors were encountered: