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

Edge HMI

AutoFormat

  • Last UpdatedOct 29, 2026
  • 1 minute read

Automatically formats a real number to a preset number of decimal places, according to the virtual table of settings created by the SetDecimalPoints function. (This is similar to the Format function, except that you do not need to specify the number of decimal places.)

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

AutoFormat

Graphic

Synchronous

Yes

Supported

Supported

Not supported

Supported

Not supported

Syntax

AutoFormat(numValue)

numValue

The real number to be formatted.

Returned value

This function returns a formatted string.

Examples

In the following examples, the SetDecimalPoints function has already been used to set 3 decimal places for values greater than equal to 1.5 and 1 decimal place for values less than or equal to -3.

Tag Name

Expression

Tag

AutoFormat( 1.543210 ) // Returned value = "1.543"

Tag

AutoFormat( -3.123456 ) // Returned value = "-3.1"

In This Topic
Related Links