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

Edge HMI

SetDecimalPoints

  • Last UpdatedOct 29, 2026
  • 2 minute read

Sets the number of decimal places to be displayed, for a specified range of real numbers. This setting will be used by all screen objects and animations that have the Auto Format option enabled, as well as by the AutoFormat function.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

SetDecimalPoints

Graphic

Synchronous

No

Supported

Supported

Not supported

Supported

Not supported

Syntax

SetDecimalPoints(numBaseValue,numBaseValue)

numBaseValue

The base value of the range of real numbers. For negative values, the range includes all real numbers less than or equal to that value. For positive values, the range includes all real numbers greater than or equal to that number. (You can set the other limit of the range by calling the function again with a new set of parameters.)

numDecimalPoints

The number of decimal places to be displayed, for the range of real numbers specified by numBaseValue.

Returned value

0

Error

1

Success

Notes

If you call this function more than once with different parameters for each call, then you can build a virtual table of format settings. You can set a different number of decimal places for each range of real numbers, and all of the settings are saved for the duration of runtime or until you reset the table using the ResetDecimalPointsTable function.

Note: This formatting does not change the actual value of any tag or expression. It only changes how the value is displayed by on-screen objects.

Examples

Tag Name

Expression

Tag

SetDecimalPoints( 1.5, 3 ) // Displays 3 decimal places for all real numbers greater than or equal to 1.5.

Tag

SetDecimalPoints( -3, 1 ) // Displays 1 decimal place for all real numbers less than or equal to -3.

In This Topic
Related Links