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 Windows Embedded Thin Client Mobile Access
AutoFormat Graphic Synchronous Supported Supported Supported Not supported


Web Studio Help function graphic autoformat.xml d135204e82 AutoFormat
The real number to be formatted.

Returned value

This function returns a formatted string.


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″