Appendix: Built-in Scripting Language Notes You can specify a real number instead of an integer, but only the whole part of the number will be converted. To convert the entire real number, use the StrFromReal function instead. Also, if you do not need to change the base, then use the Str function instead. Examples 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. Syntax StrFromReal( numValue , numPrecision , { strType | f | e | E } ) 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: 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" .
InduSoft Web Studio Page 469 Tag Name Expression Tag StrFromInt( 26, 2 ) // Returned value = "11010" Tag StrFromInt( 26, 8 ) // Returned value = "32" Function Group Execution Windows Embedded Thin Client StrFromReal String Synchronous Supported Supported Supported 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".