Once I've read here that arithmetic expressions get evaluated in real edit form controls. It was an interesting fact that I didn't know. As an alternative way to evaluate arithmetic expressions runBuf and evalBuf kernel functions can be used, however they require code access permission validation.
Today I found yet another way to do the same thing - formattedStr2Num kernel function, which is designed to convert strings to reals but it accepts arithmetic expressions too. Probably it is the function invoked by form real edit control to evaluate user input.
Example:
formattedStr2Num('0.23 + 1 * (2 - 0,5)');
gives 1.73 as the result.
good one :)
ReplyDeleteMuch better than my idea with the RealControl!
ReplyDeleteThank you for explaining this function (which seems I didn't know until now ...).
A good find indeed! I had found the blog post by Luegisdorf, and was looking for this method!
ReplyDelete
ReplyDeleteI'm going to highly recommend this web site
http://www.prokr.net/2016/09/insulating-companies-3.html
http://www.prokr.net/2016/09/insulating-companies-2.html
http://www.prokr.net/2016/09/insulating-companies.html
ugg outlet
ReplyDeletemichael kors handbags
celine outlet
jordan shoes
ugg boots
uggs outlet
longchamp handbags
ugg boots outlet
montblanc pens
louboutin shoes
201612.10chenjinyan
Well written and brilliantly executed blog and I just want to admire your writing skills because you have pulled this job in a quite unique manner which is very rare to see these days and I hope that you should share more and more in future also.
ReplyDeleteTextile Industry Analysis
Very interesting post to read on and the main centre of attraction of this post is the choice of the title which catches the eyes of every reader quite easily and make it more readable and the presentation is also very good. Cheers to great work and hope to see more from you in future also.
ReplyDeleteLatest Trends in Art