Posted this in the questions group, slightly altered this class (posted originally by Erel) so that it will handle any (?) faulty input string and not
produce an unhandled error. Requested to put this in this group and attached a simple B4XPages project demonstrating this.
Posted by zipping the...
Just trying this out:
https://www.b4x.com/android/forum/threads/b4x-eval-expressions-evaluator.54629/
And trying to make it so that it will handle any expression, so also faulty expressions.
For now I am just testing with this simple but faulty expression:
6/2(2+1)
Added lots of Try Catch and...
When the numbers are smaller than 3 decimal places in parenthesis b4xeval appears to treat it as a string instead of a number causing it to error.
Any ideas?
Dim e As B4XEval
e.Initialize(Me, "Eval")
Log((.03+.02)/2)
Log(e.Eval("(.03+.02)/2"))
Log((.003+.002)/2)...
The principle behind this app is that "time is money". I have worked most of my life as a research scientist and consultant, and I can say that I have wasted a huge amount of time ($) because of poor software and data management tools.
It is not so much that the tools don't work, they do...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.