![]() |
NumFormatStringRec |
Header: NumberFormatting.h |
typedef NumFormatString NumFormatStringRec;
To allow for all of the international variations in numeric presentation styles, you need to include in your function calls a number parts table from a tokens ('itl4') resource. You can usually use the number parts table in the standard tokens resource that is supplied with the system. You also need to define the format of input and output numeric strings, including which characters (if any) to use as thousand separators, whether to indicate negative values with a minus sign or by enclosing the number in parentheses, and how to display zero values.
To make it possible to map a number that was formatted for one specification into another format, the Macintosh Operating System defines an internal numeric representation that is independent of region, language, and other multicultural considerations: the NumFormatStringRec structure. This structure is created from a number format specification string that defines the appearance of numeric strings.
Four of the numeric string functions use the number formatting specification, defined by the NumFormatStringRec data type: StringToFormatRec, FormatRecToString, StringToExtended, and ExtendedToString. The number format specification structure contains the data that represents the internal number formatting specification information. This data is stored in a private format.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)