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

PI System Management Tools

Format (Tag-based PE function)

  • Last UpdatedOct 04, 2024
  • 1 minute read

Convert a number to string according to a format expression.

Syntax

Format(x, format [,numType ])

Arguments

x

A numeric value (real or integer).

format

Format-control string. This is the same as that used by the C language function Sprintf.

numType

Optional. Character indicating number type, either R(eal) or I(nteger). The default is R.

Returns

A formatted string.

Example

Format('sinusoid', "%3.3f", "R") = "66.890"

Format(45, "%3.3d") = "045"

Format(45, "%3.3d", "I") = "045"

Format(45, "%3.3d", "R") = "000" (Don't do this!)

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