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

AVEVA™ Plant SCADA

RealToStr

  • Last UpdatedJul 18, 2023
  • 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
TitleResults for “How to create a CRG?”Also Available in