|
20 | 20 |
|
21 | 21 | <refsect1 role="parameters">
|
22 | 22 | &reftitle.parameters;
|
23 |
| - <para> |
24 |
| - <variablelist> |
25 |
| - <varlistentry> |
26 |
| - <term><parameter>num</parameter></term> |
27 |
| - <listitem> |
28 |
| - <para> |
29 |
| - An integer or a string. The string representation can be decimal, |
30 |
| - hexadecimal or octal. |
31 |
| - </para> |
32 |
| - </listitem> |
33 |
| - </varlistentry> |
34 |
| - <varlistentry> |
35 |
| - <term><parameter>base</parameter></term> |
36 |
| - <listitem> |
37 |
| - <para> |
38 |
| - The base. |
39 |
| - </para> |
40 |
| - <para> |
41 |
| - The base may vary from 2 to 62. If base is 0 (default value), the |
42 |
| - actual base is determined from the leading characters: if the first |
43 |
| - two characters are <literal>0x</literal> or <literal>0X</literal>, |
44 |
| - hexadecimal is assumed, if the first two characters are <literal>0b</literal> or <literal>0B</literal>, |
45 |
| - binary is assumed, otherwise if the first character is <literal>0</literal>, |
46 |
| - octal is assumed, otherwise decimal is assumed. |
47 |
| - For bases up to 36, case is ignored; upper-case and lower-case letters have the same value. |
48 |
| - For bases 37 to 62, upper-case letter represent the usual 10 to 35 while lower-case letter represent 36 to 61. |
49 |
| - </para> |
50 |
| - </listitem> |
51 |
| - </varlistentry> |
52 |
| - </variablelist> |
53 |
| - </para> |
| 23 | + <variablelist> |
| 24 | + <varlistentry> |
| 25 | + <term><parameter>num</parameter></term> |
| 26 | + <listitem> |
| 27 | + <simpara> |
| 28 | + An integer or a string. The string representation can be decimal, |
| 29 | + hexadecimal, octal, or binary. |
| 30 | + </simpara> |
| 31 | + </listitem> |
| 32 | + </varlistentry> |
| 33 | + <varlistentry> |
| 34 | + <term><parameter>base</parameter></term> |
| 35 | + <listitem> |
| 36 | + <simpara> |
| 37 | + The base to use for converting a <type>string</type> representation. |
| 38 | + </simpara> |
| 39 | + <simpara> |
| 40 | + An explicit base can be between <literal>2</literal> and <literal>62</literal>. |
| 41 | + For bases up to <literal>36</literal>, case is ignored; |
| 42 | + upper-case and lower-case letters have the same value. |
| 43 | + For bases <literal>37</literal> to <literal>62</literal>, |
| 44 | + upper-case letter represent the values <literal>10</literal> to |
| 45 | + <literal>35</literal> and lower-case letter represent the values |
| 46 | + <literal>36</literal> to <literal>61</literal>. |
| 47 | + </simpara> |
| 48 | + <simpara> |
| 49 | + If <parameter>base</parameter> is <literal>0</literal> then the actual |
| 50 | + base is determined from the leading characters of <parameter>num</parameter>. |
| 51 | + If the first two characters are <literal>0x</literal> or <literal>0X</literal>, |
| 52 | + the string is interpreted as a hexadecimal integer. |
| 53 | + If the first two characters are <literal>0b</literal> or <literal>0B</literal>, |
| 54 | + the string is interpreted as a binary integer. |
| 55 | + If the first two characters are <literal>0o</literal> or <literal>0o</literal>, |
| 56 | + the string is interpreted as an octal integer. |
| 57 | + Moreover, if the first character is <literal>0</literal> the string |
| 58 | + is also interpreted as an octal integer. |
| 59 | + In all other cases, the string is interpreted as a decimal integer. |
| 60 | + </simpara> |
| 61 | + </listitem> |
| 62 | + </varlistentry> |
| 63 | + </variablelist> |
54 | 64 | </refsect1>
|
55 | 65 |
|
56 | 66 | <refsect1 role="returnvalues">
|
|
60 | 70 | </para>
|
61 | 71 | </refsect1>
|
62 | 72 |
|
| 73 | + <refsect1 role="changelog"> |
| 74 | + &reftitle.changelog; |
| 75 | + <informaltable> |
| 76 | + <tgroup cols="2"> |
| 77 | + <thead> |
| 78 | + <row> |
| 79 | + <entry>&Version;</entry> |
| 80 | + <entry>&Description;</entry> |
| 81 | + </row> |
| 82 | + </thead> |
| 83 | + <tbody> |
| 84 | + <row> |
| 85 | + <entry>8.1.0</entry> |
| 86 | + <entry> |
| 87 | + Support for explicit octal prefixes <literal>0o</literal> and |
| 88 | + <literal>0o</literal> has been added for <parameter>num</parameter> strings. |
| 89 | + Interpretation of such prefixes when <parameter>base</parameter> is |
| 90 | + <literal>0</literal> has also been added. |
| 91 | + </entry> |
| 92 | + </row> |
| 93 | + </tbody> |
| 94 | + </tgroup> |
| 95 | + </informaltable> |
| 96 | + </refsect1> |
| 97 | + |
63 | 98 | <refsect1 role="examples">
|
64 | 99 | &reftitle.examples;
|
65 | 100 | <para>
|
|
0 commit comments