📄 xbd_chap07.html
字号:
<p class="tent"> </p></th><th align="left"><p class="tent"> </p></th><th align="center"><p class="tent"><b>2</b></p></th><th align="center"><p class="tent"><b>1</b></p></th><th align="center"><p class="tent"><b>0</b></p></th></tr><tr valign="top"><td align="left"><p class="tent"><b>p_cs_precedes</b> = 1</p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 0</p></td><td align="left"><p class="tent">($1.25)</p></td><td align="left"><p class="tent">($ 1.25)</p></td><td align="left"><p class="tent">($1.25)</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 1</p></td><td align="left"><p class="tent">+ $1.25</p></td><td align="left"><p class="tent">+$ 1.25</p></td><td align="left"><p class="tent">+$1.25</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 2</p></td><td align="left"><p class="tent">$1.25 +</p></td><td align="left"><p class="tent">$ 1.25+</p></td><td align="left"><p class="tent">$1.25+</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 3</p></td><td align="left"><p class="tent">+ $1.25</p></td><td align="left"><p class="tent">+$ 1.25</p></td><td align="left"><p class="tent">+$1.25</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 4</p></td><td align="left"><p class="tent">$ +1.25</p></td><td align="left"><p class="tent">$+ 1.25</p></td><td align="left"><p class="tent">$+1.25</p></td></tr><tr valign="top"><td align="left"><p class="tent"><b>p_cs_precedes</b> = 0</p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 0</p></td><td align="left"><p class="tent">(1.25 $)</p></td><td align="left"><p class="tent">(1.25 $)</p></td><td align="left"><p class="tent">(1.25$)</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 1</p></td><td align="left"><p class="tent">+1.25 $</p></td><td align="left"><p class="tent">+1.25 $</p></td><td align="left"><p class="tent">+1.25$</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 2</p></td><td align="left"><p class="tent">1.25$ +</p></td><td align="left"><p class="tent">1.25 $+</p></td><td align="left"><p class="tent">1.25$+</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 3</p></td><td align="left"><p class="tent">1.25+ $</p></td><td align="left"><p class="tent">1.25 +$</p></td><td align="left"><p class="tent">1.25+$</p></td></tr><tr valign="top"><td align="left"><p class="tent"> </p></td><td align="left"><p class="tent"><b>p_sign_posn</b> = 4</p></td><td align="left"><p class="tent">1.25$ +</p></td><td align="left"><p class="tent">1.25 $+</p></td><td align="left"><p class="tent">1.25$+</p></td></tr></table></center><p>The following is an example of the interpretation of the <b>mon_grouping</b> keyword. Assuming that the value to be formatted is123456789 and the <b>mon_thousands_sep</b> is <tt>'"</tt> , then the following table shows the result. The third column shows theequivalent string in the ISO C standard that would be used by the <a href="../functions/localeconv.html"><i>localeconv</i>()</a> function to accommodate this grouping.</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th align="center"><p class="tent"><b>mon_grouping</b></p></th><th align="center"><p class="tent"><b>Formatted Value</b></p></th><th align="center"><p class="tent"><b>ISO C String</b></p></th></tr><tr valign="top"><td align="left"><p class="tent">3;-1</p></td><td align="left"><p class="tent">123456'789</p></td><td align="left"><p class="tent">"\3\177"</p></td></tr><tr valign="top"><td align="left"><p class="tent">3</p></td><td align="left"><p class="tent">123'456'789</p></td><td align="left"><p class="tent">"\3"</p></td></tr><tr valign="top"><td align="left"><p class="tent">3;2;-1</p></td><td align="left"><p class="tent">1234'56'789</p></td><td align="left"><p class="tent">"\3\2\177"</p></td></tr><tr valign="top"><td align="left"><p class="tent">3;2</p></td><td align="left"><p class="tent">12'34'56'789</p></td><td align="left"><p class="tent">"\3\2"</p></td></tr><tr valign="top"><td align="left"><p class="tent">-1</p></td><td align="left"><p class="tent">123456789</p></td><td align="left"><p class="tent">"\177"</p></td></tr></table></center><p>In these examples, the octal value of {CHAR_MAX} is 177.</p><p>IEEE Std 1003.1-2001/Cor 1-2002, item XBD/TC1/D6/6 adds a correction that permits the Euro currency symbol andaddresses extensibility. The correction is stated using the term "should" intentionally, in order to make this a recommendationrather than a restriction on implementations. This allows for flexibility in implementations on how they handle future currencysymbol additions.</p><p>IEEE Std 1003.1-2001/Cor 1-2002, tem XBD/TC1/D6/5 is applied, adding the <b>int_[np]_*</b> values to the POSIX localedefinition of <i>LC_MONETARY .</i></p><h5><a name="tag_01_07_03_04"></a>LC_NUMERIC</h5><p>See the rationale for <i>LC_MONETARY</i> for a description of the behavior of grouping.</p><h5><a name="tag_01_07_03_05"></a>LC_TIME</h5><p>Although certain of the conversion specifications in the POSIX locale (such as the name of the month) are shown with initialcapital letters, this need not be the case in other locales. Programs using these conversion specifications may need to adjust thecapitalization if the output is going to be used at the beginning of a sentence.</p><p>The <i>LC_TIME</i> descriptions of <b>abday</b>, <b>day</b>, <b>mon</b>, and <b>abmon</b> imply a Gregorian style calendar(7-day weeks, 12-month years, leap years, and so on). Formatting time strings for other types of calendars is outside the scope ofIEEE Std 1003.1-2001.</p><p>While the ISO 8601:2000 standard numbers the weekdays starting with Monday, historical practice is to use the Sunday as the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -