Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:8000_appendices:0300_number_format_java [2022/08/18 12:28] – removed - external edit (Unknown date) 127.0.0.1docs:8000_appendices:0300_number_format_java [2022/09/13 18:15] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Appendix C. Number Format in Java Programming Language ======
 +
 +The following section describes the format of the number used in the Java Programming Language. This format can be used for attributes of Number type – see [[docs:2500_config_apps:0700_add_edit_attributes:0300_number_attributes|Setting Properties of Number Attributes]].
 +
 +The string representing the number format has the following form: 
 +
 +''positive-pattern[;negative-pattern]''
 +
 +
 +
 +If the negative pattern is omitted, negative numbers are formatted using the positive pattern with a “-“ character prepended to the result. Each pattern has the following form: 
 +
 +''[prefix]integer[.fraction][suffix]''
 +
 +
 +
 +The following symbols are significant in the pattern string. 
 +
 +^Symbol^Description^
 +| 0|A digit|
 +| #|A digit where 0 is not shown|
 +| .|A placeholder for a decimal separator|
 +| ,|A placeholder for a grouping separator|
 +| ;|The format separator|
 +| -|The default negative prefix|
 +| %|Multiplies value by 100 and shows as a percentage|
 +
 +Any characters other than these special characters can appear in the prefix or the suffix. A single quote can be used to escape a special character, if you need to use one of these symbols in a prefix or a suffix. 
 +
 +For example, the pattern string for U.S. currency values is: 
 +
 +''$#,##0.00;($#,##0.00)''
 +
 +
 +
 +This indicates that a $ character is prepended to all formatted values. The grouping separator character , is inserted every three digits. Exactly two digits after the decimal place are always shown. Negative values are shown in parentheses. Thus, the value -1234.56 produces output like: 
 +
 +''($1,234.56)''
 +
 +
 +
 +