<< Click to Display Table of Contents >> Manual > Appendix > Number Format > Number format options and properties |
About number format options and properties
The number format has "options" and "properties". These are used in the following situations:
•When specifying the number format: Options and properties can be specified
•When defining a user format...Properties can be specified
■ Number format options
When specifying a number format, you can specify options and properties using the following format:
@numberformatname.optionformat<propertyformat>
To specify an option, put a dot character "." after the number format name such as "@NUMBER" and then add any optional format.
In addition, if you want to specify multiple options at the same time in the numeric format option format, you can specify multiple options together, such as @NUMBER.L16S4. (Note: In this example, two options, "L16" and "S4", are specified. Note that you cannot specify it as "@NUMBER.L16.S4".)
In addition, you can specify a property format at the end of the number format as
Example of specifying number format:
@NUMBER 12345.678
@NUMBER.2 ... 12345.68 *2 decimal places
@NUMBER.2S ... 12,345.68 *With two decimal places, a separator "," is added
@NUMBER
@NUMBER.2
When specifying a format, you can specify multiple properties by separating each property with a semicolon, like so: When listing <> pairs, make sure not to put any characters between the <> (spaces are also not allowed). |
The options available for the number format are:
■ List of number format options
Option Format |
Number |
You can specify the number of decimal points by specifying a number immediately after the dot character ".".
Example: @NUMBER.2
|
L[number] |
The number of characters to be displayed. Specify the number of digits after "L".
Example) @BIN.L8 ... 8-digit binary number
|
|
S[number] |
Set how many digits the separator should be displayed (the number can be omitted). If you specify only "S", the number will be displayed with the default number of digits. You can also change the number of digits by specifying a number after S.
Example) @BIN.L16S4 ... 16-digit binary number, separated by 4 digits
|
|
P |
This option will display a positive sign (usually '+') for positive numbers.
Example: @NUMBER.P
|
|
M[number] |
Shifts the decimal point. (For positive numbers, it is multiplied by 10^x. For negative numbers, it is multiplied by 10^1/x.)
Example) @NUMBER.M2 - Multiplies the number by 100 and displays it
|
Example) When Locale is "ja"
Example of specifying number format |
Display example |
@NUMBER |
12345.678 |
@NUMBER.2 |
12345.68 |
@NUMBER.2S |
12,345.68 |
@NUMBER.2SP |
+12,345.68 |
@NUMBER.M2 |
1234567.8 |
The properties that can be specified in the number format are as follows:
■List of number format properties
Properties |
specification |
All=Number format name |
It inherits all the properties of the number format specified by the number format name.
Example) All = @LOCALE ... inherits all properties of @LOCALE
|
Base = Base |
Specifies the base. •2...binary number •8...octal •10...Decimal number •16: Hexadecimal (uppercase notation, e.g. FFFF) •16s: Hexadecimal (lowercase, e.g. ffff)
Example) Base=2
|
DecimalPlaces = Number D=number |
Specifies the number of decimal points. (Abbreviation: D)
Example: DecimalPlaces=2
|
DecimalPointMoving=Number M=number |
Moves the decimal point. (Abbreviation: M) *For positive numbers, it is multiplied by 10^x. For negative numbers, it is multiplied by 10^1/x.
Example) DecimalPointMoving=2 - multiplied by 100
|
DecimalSymbol = Character DS=character |
Specify the character that represents the decimal point. (For example, a period. You can specify a space with "$SP". Abbreviation: DS)
Example) DecimalSymbol=,...Decimal point is expressed as a single comma
|
Separator=T/F S=T/F |
Specify whether to display a separator (for example, a comma) with "T" or "F" (abbreviation: S). The number of digits to display the separator follows the setting of SeparatorGrouping. * If you specify T for this property, the separator will be displayed even if you do not specify ".S" in the number format option.
Example) Separator=T
|
SeparatorSymbol = Character SS=character |
Specify the character that represents the separator. (For example, a comma. You can specify a space with "$SP". Abbreviation: SS)
Example) SeparatorSymbol=$SP ..separator is expressed as one space character
|
SeparatorGrouping = setting value SG=character |
This is the group setting that indicates how many digits the separator should be displayed for (abbreviation: SG). Specify one of the following: If you specify a single number, a separator will be displayed for each specified number of digits. Also, if you separate numbers with a colon, such as "3:2", the number will be separated by the first specified number of digits starting from the ones digit (in this example, three digits), and then the number of digits specified in the second place will be repeated thereafter (in this example, two digits).
Example 1) SeparatorGrouping=3 ... 123,456,789 Example 2) SeparatorGrouping=3:0 - 123456,789 Example 3) SeparatorGrouping=3:2...12,34,56,789
|
PositiveSign=character P=letter |
You can specify the sign to display for positive numbers (abbreviation: P). If you leave it blank, nothing will be displayed. Below is an example of the number "123"
Example 1) PositiveSign = 123 Example 2) PositiveSign=+ ... +123
|
NegativeSign=character N=letter |
You can specify the sign to display for negative numbers. (Abbreviation: N) Below is an example of the number "-123"
Example) NegativeSign=- -123
|
NegativeNumberFormat = Number NF=number |
You can select the display format for negative numbers from five types ranging from 0 to 4. (Abbreviation: NF) Below is an example of the number "-1.1".
Example 1) NegativeNumberFormat=0 ・・・ (1.1) Example 2) NegativeNumberFormat=1 ・・・ -1.1 Example 3) NegativeNumberFormat=2 ・・・ - 1.1 Example 4) NegativeNumberFormat=3 ・・・ 1.1- Example 5) NegativeNumberFormat=4 ・・・ 1.1 -
|
DisplayLeadingZeros=T/F DZ=T/F |
Specifies the display specifications for the integer part of a decimal number (abbreviation: DZ). For example, if the number is "0.123", it will be displayed as "0.123" when it is T and as ".123" when it is F.
Example) DisplayLeadingZeros=T
|
DisplayLength=number L=number |
Specifies the number of digits in the entire numeric display (abbreviation: L). If the number of characters in the numeric display is smaller than DisplayLength, it will be padded with the character specified by PaddingSymbol. If 0 is specified, padding with PaddingSymbol will not be performed. If the number of characters in the numeric display is larger than DisplayLength, padding will not be performed and the entire number will be displayed.
Example) DisplayLength=8
|
PaddingSymbol=character PS=character |
When the number of digits in the numeric display is specified, specify the fill character to be used when the number of digits is less than the specified number. (0, etc. Spaces can be specified with "$SP". Abbreviation: PS)
Example: PaddingSymbol=0...00000123 *When DisplayLength=8
|
Header=Character H=letter |
Specify the character (string) you want to display as the header for the number. ("$SP" will be replaced with a space when displayed. Abbreviation: H)
Example) Header = Temp$SP ... Temp 123
|
Footer=Text F=letter |
Specify the character (string) you want to display as the footer of the numeric value. ("$SP" will be replaced with a space when displayed. Abbreviation: F)
Example) Footer=$SPdegC...123 degC
|
QualityBad=Character QB=character |
When the CNumToLocale (NL) route method argument is a tag path, Number or Fault can be used to specify the text to be displayed when the method judges that the result is Bad. If you leave it blank, nothing will be displayed. If you specify $VALUE, the value will be displayed as is even if it is BAD. (Abbreviation: QB)
Example) QualityBad=***
|
QualityUncertain=Character QU=character |
CNumToLocale (NL) When the parameters passed in Number and Fault are tag paths among the arguments of the root method, specify the character to be displayed when the result of the method is Uncertain. If you leave it as an empty string, nothing will be displayed. (Abbreviation: QU)
Example) QualityUncertain=
|
QualityNA=Character QN=character |
CNumToLocale (NL) When the parameters passed in Number and Fault are tag paths among the arguments of the root method, specify the character to be displayed when the result of the method is NA. If you leave it as an empty string, nothing will be displayed. (Abbreviation: QN)
Example) QualityNA=
|
The prohibited characters for parameters specified on the right side of a property (the "xxx" part of property name = xxx) are as follows.
";" - semicolon "><" - A string of characters consisting of the above characters consecutively. <Header=<aaa>> is OK. <Header=<aaa>>bbb>> is not OK.
|
Among the above, the settings of QualityBad, QualityUncertain, and QualityNA also affect the behavior of the numeric display parts of library parts (part libraries). Library parts use "@NUMBER" as the numeric format, and by customizing @NUMBER in the user format, you can change the display characters of "***" that are displayed when a library part is abnormal all at once. |