web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

FormattedStr2Num kernel function

Volodymyr Giginiak Profile Picture Volodymyr Giginiak Microsoft Employee
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.

This was originally posted here.

Comments

*This post is locked for comments