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

AVEVA™ Plant SCADA

StrFormat

  • Last UpdatedJul 18, 2023
  • 1 minute read

Converts a variable into a formatted string. This function is the equivalent of the Cicode " :#### " operator.

Syntax

StrFormat(Variable, Width, DecPlaces, EngUnits)

Variable:

The variable to format into a string.

Width:

The width of the variable after it has been converted to string format.

DecPlaces:

The number of decimal places in the converted string.

EngUnits:

The engineering units of the variable.

Return Value

The variable (as a formatted string).

StrToReal, StrToInt, RealToStr, IntToStr

Example

Variable=StrFormat(10.345,5,2,"%");

! Sets Variable to "10.35%".

See Also

String Functions

Using the Caret Escape Sequence Character

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in