Please enable JavaScript to view this site.

ESL Documentation

Navigation: » No topics above this level «

Q15 How can I display a float point value with a specific number of decimal places?

Scroll Prev Top Next More

An issue arises when you want to display floating point numbers within ESL. An example of this is displaying a floating point variable in an entry field using the syntax "change EF text to FloatVal". ESL performs a type conversion automatically from float to string and it will use the value of "precision" set in the program (the default display precision is 2 places). If you want to display the value to a precision different from that set in the program, the following subroutine will take a floating point value and convert it to a string with the desired number of decimal places:

ESLLan20