Important: The information in this document is obsolete and should not be used for new development.
The Intl0Rec Data Type
You can access the numeric-format resource through theIntl0Rec
data type.
TYPE Intl0Rec = PACKED RECORD decimalPt: Char; {decimal point character} thousSep: Char; {thousands separator} listSep: Char; {list separator} currSym1: Char; {currency symbol} currSym2: Char; currSym3: Char; currFmt: Byte; {currency format flags} dateOrder: Byte; {order of short date elements} shrtDateFmt: Byte; {short date format flags} dateSep: Char; {date separator} timeCycle: Byte; {time cycle:0-23, 0-11, or 12-11} timeFmt: Byte; {time format flags} mornStr: PACKED ARRAY[1..4] OF Char; {trailing } { string for first 12-hour cycle} eveStr: PACKED ARRAY[1..4] OF Char; {trailing } { string for last 12-hour cycle} timeSep: Char; {time separator} time1Suff: Char; {trailing string for morning } time2Suff: Char; { part of 24-hour cycle} time3Suff: Char; time4Suff: Char; time5Suff: Char; {trailing string for afternoon } time6Suff: Char; { part of 24-hour cycle} time7Suff: Char; time8Suff: Char; metricSys: Byte; {255 if metric, 0 if not} intl0Vers: Integer; {version information} END; Intl0Ptr = ^Intl0Rec; Intl0Hndl = ^Intl0Ptr;
- Note
- A
NULL
character (ASCII code 0) in a field of typeChar
means that no such character exists. The currency symbol and the trailing string for the 24-hour cycle are separated into individualChar
fields because of Pascal packing conventions. All strings include any required spaces.Field Description
decimalPt
- Part of the number format definition. The1-byte character that appears before the decimal representation of a fraction with a denominator of 10. In the United States, this format is a period. In several European countries, it is a comma.
thousSep
- Part of the number format definition. The 1-byte character that separates every three digits to the left of the decimal point. In the United States, this format is a comma. In several European countries, it is a period.
listSep
- Part of the number format definition. The 1-byte character that separates numbers, as when a list of numbers is entered by the user; it must be different from the decimal point character. If it's the same as the thousands separator, the user must not include the latter in entered numbers. In the United States, this format is a semicolon. In the United Kingdom, it is a comma.
currSym1
- Part of the currency format definition. The initial byte used to indicate currency. One character is sufficient for the United States ($) and United Kingdom ().
currSym2
- Part of the currency format definition. The second byte used to indicate currency. Two characters are required for France (Fr).
currSym3
- Part of the currency format definition. The third byte used to indicate currency. Three characters are required for Italy (Li.) and Germany (DM.).
currFmt
- Part of the currency format definition. The four least significant bits are unused. The four most significant bits are Boolean values. Bit 7 determines whether there is a leading integer zero; for example, a 1 in this field specifies a format like 0.23, whereas a 0 specifies .23.
Bit 6 determines whether there are trailing decimal zeros; for example, a 1 in this field specifies a format like 325.00, whereas a 0 specifies 325. Bit 5 determines whether to use a minus sign or parentheses to denote a negative currency amount; for example,
a 1 in this field specifies a format like -0.45, whereas a 0 specifies (0.45). Bit 4 determines whether the currency symbol trails or leads; for example, a value of 1 in this field specifies a format like the $3.00 used in the United States, whereas a value of 0 specifies the
3 DM. used in Germany.- You can use the following predefined constants as masks to set or test the bits in the
currFmt
field:
Constant Value Explanation currSymLead 16 Currency symbol leads currNegSym 32 Use minus sign for negative currTrailingZ 64 Use trailing decimal zeros currLeadingZ 128 Use leading integer zero - Note
- You can also apply the currency format's leading-zero and trailing-zero indicators to the number format if desired.
dateOrder
- Part of the short date format definition. Defines the order of the elements (month, day, and year) of the short date format. The order varies from region to region--for example, 12/29/72 is a common order in the United States, whereas 29.12.72 is common in Europe.
- You can indicate the order of the day, month, and year with the following constants:
Constant Value Explanation mdy 0 Month-day-year dmy 1 Day-month-year ymd 2 Year-month-day myd 3 Month-year-day dym 4 Day-year-month ydm 5 Year-day-month shrtDateFmt
- Part of the short date format definition. The five least significant bits are unused. The three most significant bit fields are Boolean values that determine whether to show the century, and whether to show leading zeros in month and day numbers. For example, if the first bit is set to 1 it specifies a date format like 10/21/1917, and set to 0 specifies the format 10/21/17. The second bit set to 1 specifies a format like 05/23/84, and set to 0 specifies the format 5/23/84. The third bit set to 1 specifies a format like 12/03/46, and set to 0 specifies the format 12/3/46.
- To set or test the bits in the
shrtDateFmt
field, you can use the following predefined constants as masks:
Constant Value Explanation dayLdingZ 32 Show leading zero for day mntLdingZ 64 Show leading zero for month century 128 Show century dateSep
- Part of the short date format definition. The 1-byte character that separates the different parts of the date. For example, in the United States this character is a slash (12/3/46), in Italy it is a hyphen (3-12-46), and in Japan it is a decimal point (46.12.3).
timeCycle
- Part of the time format definition. Indicates the time cycle--that is, whether to use 12 or 24 hours as the basis of time, and whether to consider midnight and noon to be 12:00 or 0:00. You can use the following predefined constants to specify the time cycle:
Constant Value Explanation timeCycle24 0 Use 24-hour format
(midnight = 0:00)timeCycleZero 1 Use A.M./P.M. format
(midnight and noon = 0:00)timeCycle12 255 Use A.M./P.M. format
(midnight and noon = 12:00)timeFmt
- Part of the time format definition. Indicates whether to show leading zeros in time representation. Bit 5 determines whether there are leading zeros in seconds; for example, a value of 1 in this field specifies a format like 11:15:05, whereas a 0 specifies the format 11:15:5. Bit 6 determines whether there are leading zeros in minutes; for example, a value of 1 in this field specifies a format like 10:05, whereas a 0 specifies the format 10:5. Bit 7 determines whether there are leading zeros in hours; for example, a value of 1 in this field specifies a format like 09:15, whereas a 0 specifies the format 9:15.
- You can use the following predefined constants as masks for setting or testing bits in the time format field:
Constant Value Explanation secLeadingZ
32 Use leading zero for seconds minLeadingZ
64 Use leading zero for minutes hrLeadingZ
128 Use leading zero for hours mornStr
- Part of the time format definition. A string of up to 4 bytes to follow the time to indicate morning (for example, " AM"). Typically, the string includes a leading space.
eveStr
- Part of the time format definition. A string of up to 4 bytes to follow the time to indicate evening (for example, " PM"). Typically, the string includes a leading space.
timeSep
- Part of the time format definition. The 1-byte character that is the time separator (for example, the colon).
time1Suff
,time2Suff
,time3Suff
,time4Suff
Part of the time format definition. A trailing string of up to 4 bytes for the morning part of the 24-hour cycle. For example, the German string "uhr" can be stored here.time5Suff
,time6Suff
,time7Suff
,time8Suff
Part of the time format definition. A trailing string of up to 4 bytes for the evening part of the 24-hour cycle. Typically, this string duplicates the string contained intime1Suff
throughtime4Suff
. For example, the German string "uhr" can be stored here.metricSys
- The unit-of-measure definition. Indicates whether to use the metric system. If 255, the metric system is used; if 0, metric is not used.
intl0Vers
- Region code and version number. The code number of the region that this resource applies to is in the high-order byte, and the version number of this numeric-format resource is in the
low-order byte.