Important: The information in this document is obsolete and should not be used for new development.
Numeric-Format Resource (Type 'itl0')
The numeric-format resource (resource type'itl0') contains general conventions for formatting numeric strings. It provides separators for decimals, thousands, and lists; it determines currency symbols and units of measurement; it specifies formats for currency, times, and short dates (the specification of dates in purely numeric representation--for example, in the U.S. Roman script system the short date for Tuesday, December 3, 1946, is 12/3/46). It also contains the region code for this particular instance of the'itl0'resource.Each enabled script system has one or more numeric-format resources. The resource ID for each one is within the range of resource ID numbers for that script system. The default numeric-format resource for a script is specified in the
itlbNumberfield of the script's international bundle ('itlb') resource.The Text Utilities routines
TimeString,LongTimeString, andStringToTimeuse information in the numeric-format resource to create time strings and to convert time strings to internal numeric representations. See the chapter "Text Utilities" in this book. The Operating System Utilities functionIsMetricexamines the numeric-format resource to determine the result it returns. See Inside Macintosh: OSUtilities.Each numeric-format resource specifies the following:
Table B-4 lists constants that you can use in the numeric-format and long-date-format resources to specify separators for standard international formats. For example, in the U.S.,
- Number format. The characters to use as the decimal separator, thousands separator, and list separator.
- Currency format. The currency symbol and its position; whether or not to include leading unit zero or trailing decimal zero; how to show negative values.
- Short date format. The order of presentation of the day, month, and year elements; whether or not to include the century and a leading zero for month or days; the separator for the elements.
- Time format. Whether or not to present leading zeros for hours, minutes, and seconds; whether to use a 24-hour time cycle or a 12-hour A.M./P.M. cycle; how to specify a trailing string (such as a morning or an evening string if a 12-hour time cycle is
being used).- Unit of measure. Whether or not the metric system should be used.
slashSymbolis the separator for the short date 12/3/46, but in GermanyperiodSymbolis the separator for the short date 3.12.1946.
Table B-4 Constants for specifying numeric separators Constant Symbol periodSymbol . commaSymbol , semicolonSymbol ; dollarsignSymbol $ slashSymbol / colonSymbol :
- IMPORTANT
- When it specifies the order of elements, the numeric-format resource describes them in terms of storage order, not display order. Using the information in a numeric-format resource frees you from assuming a particular memory order for the components of numbers and short dates. However, the resource does not necessarily specify the left-to-right order for displaying the components.
![]()
Subtopics
- The Intl0Rec Data Type