Use percent code formatting to specify how you want LabVIEW to display numbers. You can use the Numeric Properties dialog box or the Format String property to specify how you want to format the numeric control. Percent codes include the following items:
- Percent Codes—String that begins with a % and ends with a letter. Letters are case sensitive. Percent codes can include the following elements between the % and the letter:
- Modifiers—A symbol that modifies the format code.
- Minimum Width—Number greater than zero that specifies the field width.
- Precision—String that begins with a . and is followed by a number greater than or equal to zero.
- Significant Digits—String that begins with a _ and is followed by a number greater than or equal to zero.
- Embedded Format Information—String that LabVIEW uses to further format a number. Enclose string within < and >.
- Delimiter—Text between, before, or after format codes. % and > are the two delimiter characters. To embed a % character in a string, use %%. To embed a > character in
a string, use \>. Refer to the Backslash ('\') Codes Display topic for more information about how LabVIEW interprets backslash codes.
- Literal strings—Text you want to appear in the string.
 |
Note You cannot use precision and significant digits together in a single percent code. |
Refer to the Format Specifiers Examples table for examples of percent code formatting.