Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Plant SCADA

RealToStr

  • Last UpdatedSep 21, 2026
  • 1 minute read

Converts a floating-point number into a string.

Syntax

RealToStr(Number, Width, Places[, Separator])

Number:

The floating-point number to convert.

Width:

The width of the string.

Places:

The number of decimal places contained in the string.

Separator:

Optionally, the decimal separator contained in the string. Defaults to empty string.

* "." - period

* "," - comma

* "" - empty string

If an empty string or an invalid separator is passed as a parameter, the string will contain the decimal separator used in the current locale.

Return Value

The floating-point number (as a string).

StrToReal

Example

Variable=RealToStr(12.345,10,1);

! Sets Variable to " 12.3" (10 characters long).

See Also

String Functions

Converting and Formatting Cicode Variables

In This Topic
Related Links