Browse Prior Art Database

Language Independent Interface For Obtaining Numeric and Monetary Category Settings From A Locale

IP.com Disclosure Number: IPCOM000015121D
Original Publication Date: 2001-Aug-01
Included in the Prior Art Database: 2003-Jun-20
Document File: 4 page(s) / 67K

Publishing Venue

IBM

Abstract

Disclosed is a language independent service that correctly parses monetary and numeric information, including dual currency specifications, for storage in an internal structure. The service has been designed to exploit dual currency support and relies on a locale to provide localization at run time to cater to local preferences. The service is designed as a procedure call to allow its us by a wide number of programming languages on a variety of processing platforms.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 36% of the total text.

Page 1 of 4

  Language Independent Interface For Obtaining Numeric and Monetary Category Settings From A Locale

Disclosed is a language independent service that correctly parses monetary and numeric information, including dual currency specifications, for storage in an internal structure. The service has been designed to exploit dual currency support and relies on a locale to provide localization at run time to cater to local preferences. The service is designed as a procedure call to allow its us by a wide number of programming languages on a variety of processing platforms.

The ACEELCNV service is used to obtain information pertaining to the LC_NUMERIC and LC_MONETARY categories of the locale. It sets the components of an object of the type NM_STRUCT with the values appropriate for formatting of the numeric quantities (monetary and otherwise) according to the rules of the current locale.

void ACEELCNV ([Locale_Handle], Num_And_Mon, [fc])

CEE_HANDLE *Locale_Handle; NM_STRUCT *Num_And_Mon; FEED_BACK *fc;

where: Locale_Handle (input/optional) - Points to the locale to be used by this service. If none is specified, the current active locale is used.

Num_And_Mon (input) - Pointer to the numeric and monetary structure to be filled by this service.If the service fails, the contents of this structure are undefined.

     A pointer to the filled-in object is returned. The structure pointed to by the return value shall not be modified by the program, but may be overwritten by a subsequent call to ACEELCNV.

     The members of the structure with the type VSTRING are strings, any of which (except decimal_point) can point to an empty string , to indicate that the value is not available in the current locale or is of zero length. The members with type VINT are non-negative numbers, any of which can be CHAR_MAX to indicate that the value is not available in the current locale. The members include the following:

           Type/member Meaning VSTRING decimal _point The decimal point character used to format non-monetary quantities. VSTRING thousands-sep The character used to separate groups of digits to the left of the decimal point in formatted non-monetary quantities.

VSTRING grouping A string whose elements indicate the size of each group of digits in formatted non-monetary quantities.

VSTRING int_curr_symbol The international currency symbol applicable tot he current locale, left justified within a four character space-padded field. The character sequences are in accordance with those specified in ISO 4217 Codes for Representation of Currency and Funds.

VSTRING currency_symbol The local currency symbol applicable to the current locale. VSTRING mon_decimal_point The decimal point character used to format monetary quantities. VSTRING mon_thousands_sep The character used to separate groups of digits to the left of the decimal point in formatted monetary quantities. 1

Page 2 of 4

VSTRING positive_sign The string used to indicate non-negative formatted monetary quantities. VSTRIN...