StrFromReal

StrFromReal is a built-in scripting function that converts a real numerical value to a string value, in either floating-point or exponential notation.

Function Group Execution Windows Embedded Thin Client Mobile Access
StrFromReal String Synchronous Supported Supported Supported Supported

Syntax

Web Studio Help function string strfromreal.xml d203807e105 StrFromReal

numValue
The numerical value to be converted.
numPrecision
The number of decimal places to be shown in the resulting string. Please note that the value will be rounded rather than truncated.
strType
A single-character code that specifies how the resulting string should be formatted, as described in the following table:
Value of strType Description
f Formatted in floating-point notation.
e Formatted in exponential notation with a lower-case “e”.
E Formatted in exponential notation with an upper-case “E”.

Returned value

This function returns a string representation of the given numerical value, with the specified precision and notation.

Examples

  StrFromReal( 263.355, 2, "f" )  

…returns a string value of “263.36″.

  StrFromReal( 263.355, 2, "e" )  

…returns a string value of “2.63e+002″.

  StrFromReal( 263.355, 2, "E" )  

…returns a string value of “2.63E+002″.

StrFromReal