Saturday, May 23, 2009

The current locale used to convert multibyte characters into

Wide character constants are recognized, but treated in all ways like
normal character constants. In that sense, the locale is the "C" locale.
3.1.3.4 The value of an integer constant that contains more than one
character, or a wide character constant that contains more than one multibyte
character.
Character constants can contain one or two characters. If two characters are
included, the first character occupies the low-order byte of the constant,
and the second character occupies the high-order byte.
3.2.1.2 The result of converting an integer to a shorter signed integer, or
the result of converting an unsigned integer to a signed integer of equal
length, if the value cannot be represented.
These conversions are performed by simply truncating the high-order
bits. Signed integers are stored as 2's-complement values, so the resulting
number is interpreted as such a value. If the high-order bit of the smaller
integer is nonzero, the value is interpreted as a negative value; otherwise,
it is positive.
3.2.1.3 The direction of truncation when an integral number is converted
to a floating-point number that cannot exactly represent the original value.
The integer value is rounded to the nearest representable value. Thus,
for example, the long value (2 to the 31th power minus 1) is converted to
the float value 2 to the 31th power. Ties are broken according to the rules
of IEEE standard arithmetic.

No comments:

Post a Comment