[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Files Reference

LC_NUMERIC Category for the Locale Definition Source File Format

Purpose

Defines rules and symbols for formatting non-monetary numeric information.

Description

The LC_NUMERIC category of a locale definition source file defines rules and symbols for formatting non-monetary numeric information. This category begins with an LC_NUMERIC category header and terminates with an END LC_NUMERIC category trailer.

All operands for the LC_NUMERIC category keywords are defined as string or integer values. String values are enclosed by " " (double-quotation marks). All values are separated from the keyword they define by one or more spaces. Two adjacent double-quotation marks indicate an undefined string value. A -1 indicates an undefined integer value. The following keywords are recognized in the LC_NUMERIC category:

copy The copy statement specifies the name of an existing locale to be used as the definition of this category. If a copy statement is included in the file, no other keyword can be specified.
decimal_point Specifies the string used for the decimal delimiter used to format numeric, non-monetary quantities.
thousands_sep Specifies the string separator used for grouping digits to the left of the decimal delimiter in formatted numeric, non-monetary quantities.
grouping Defines the size of each group of digits in formatted monetary quantities. The operand for the grouping keyword consists of a sequence of semicolon-separated integers. Each integer specifies the number of digits in a group. The initial integer defines the size of the group immediately to the left of the decimal delimiter. The following integers define succeeding groups to the left of the previous group. If the last integer is not -1, the size of the previous group (if any) is used repeatedly for the remainder of the digits. If the last integer is -1, no further grouping is performed.

The following is an example of the interpretation of the grouping statement. Assuming the value to be formatted is 123456789 and the operand for the thousands_sep keyword is ' (single quotation mark) the following results occur:

Grouping Value Formatted Value
3;-1 123456'789
3 123'456'789
3;2;-1 1234'56'789
3;2 12'34'56'789
-1 123456789

Examples

Following is an example of a possible LC_NUMERIC category listed in a locale definition source file:

LC_NUMERIC
#
decimal_point    "<period>"
thousands_sep    "<comma>"
grouping         <3>
#
END LC_NUMERIC

Implementation Specifics

This category of the locale definition source file format is part of the Base Operating System (BOS) Runtime.

Files

/usr/lib/nls/loc/* Specifies locale definition source files for supported locales.
/usr/lib/nls/charmap/* Specifies character set description (charmap) source files for supported locales.

Related Information

The locale command, localedef command.

Character Set Description (charmap) Source File Format , Locale Definition Source File Format , Locale Method Source File Format .

For specific information about other locale categories and their keywords, see the LC_COLLATE category, LC_CTYPE category, LC_MESSAGES category, LC_MONETARY category, and LC_TIME category for the locale definition source file format.

Changing Your Locale and Understanding the Locale Definition Source File in AIX Version 4.3 System Management Concepts: Operating System and Devices.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]