Documentation >
MAC-PAC Reference Library >
Distribution >
Expert Configurator >
Key Concepts and Procedures >
Configuration Codes >
Formatting Numeric and Alphanumeric Fields
Formatting Numeric and Alphanumeric Fields
Configuration codes follow the following rules when formatting numeric and alphanumeric fields:
The decimal place (.) will be included in the configuration code when formatted with numeric fields. This means you will need to account for this space in the configuration code template.
· Formatting for numeric fields is from right to left.
· For internal variables and option variables, the exact number of decimal positions will be displayed. Be sure to provide space for the entire number including the decimal place because all truncation begins at the left most position. For example: if you have an option defined as 6,3 (six digits long with three decimal places), your configuration code field should be at lease 7 alphanumeric to show all positions. If the option has a value of "123.456" and the template field was only 5 alphanumeric, the configuration code will be formatted with "3.456".
· For secondary variables and global variables, the decimal precision is assumed to be 14,6 (fourteen digits long with six decimal places). If the decimal positions contain a nonzero value, the configuration code will display all six decimal places. Be sure to account for this when assigning a length to your configuration code field. For example: if you have a secondary variable with a value of "123.4" the configuration code will be formatted with "123.400000". If the secondary variable has a value of "123.0" the configuration code will be formatted with "123".
· For alphanumeric fields the configuration code field is formatted from left to right. Truncating will occur at the end of the field. For example: if you define a template field for Color to be 3 long and the option used to format the template is "YELLOW", the configuration code will be formatted with "YEL".