⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 awk.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td align="left"><p class="tent">Left</p></td></tr><tr valign="top"><td align="left"><p class="tent">( <i>index</i> ) in <i>array</i></p></td><td align="left"><p class="tent">Multi-dimension array</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Left</p></td></tr><tr valign="top"><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">membership</p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">&nbsp;</p></td></tr><tr valign="top"><td align="left"><p class="tent"><i>expr</i> &amp;&amp; <i>expr</i></p></td><td align="left"><p class="tent">Logical AND</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Left</p></td></tr><tr valign="top"><td align="left"><p class="tent"><i>expr</i> || <i>expr</i></p></td><td align="left"><p class="tent">Logical OR</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Left</p></td></tr><tr valign="top"><td align="left"><p class="tent"><i>expr1</i> ? <i>expr2</i> : <i>expr3</i></p></td><td align="left"><p class="tent">Conditional expression</p></td><td align="left"><p class="tent">Type of selected</p></td><td align="left"><p class="tent">Right</p></td></tr><tr valign="top"><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent"><i>expr2</i> or <i>expr3</i></p></td><td align="left"><p class="tent">&nbsp;</p></td></tr><tr valign="top"><td align="left"><p class="tent">lvalue ^= <i>expr</i></p></td><td align="left"><p class="tent">Exponentiation assignment</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Right</p></td></tr><tr valign="top"><td align="left"><p class="tent">lvalue %= <i>expr</i></p></td><td align="left"><p class="tent">Modulus assignment</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Right</p></td></tr><tr valign="top"><td align="left"><p class="tent">lvalue *= <i>expr</i></p></td><td align="left"><p class="tent">Multiplication assignment</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Right</p></td></tr><tr valign="top"><td align="left"><p class="tent">lvalue /= <i>expr</i></p></td><td align="left"><p class="tent">Division assignment</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Right</p></td></tr><tr valign="top"><td align="left"><p class="tent">lvalue += <i>expr</i></p></td><td align="left"><p class="tent">Addition assignment</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Right</p></td></tr><tr valign="top"><td align="left"><p class="tent">lvalue -= <i>expr</i></p></td><td align="left"><p class="tent">Subtraction assignment</p></td><td align="left"><p class="tent">Numeric</p></td><td align="left"><p class="tent">Right</p></td></tr><tr valign="top"><td align="left"><p class="tent">lvalue = <i>expr</i></p></td><td align="left"><p class="tent">Assignment</p></td><td align="left"><p class="tent">Type of <i>expr</i></p></td><td align="left"><p class="tent">Right</p></td></tr></table></center><p>Each expression shall have either a string value, a numeric value, or both. Except as stated for specific contexts, the value ofan expression shall be implicitly converted to the type needed for the context in which it is used. A string value shall beconverted to a numeric value by the equivalent of the following calls to functions defined by the ISO&nbsp;C standard:</p><pre><tt>setlocale(LC_NUMERIC, "");</tt><i>numeric_value</i> <tt>= atof(</tt><i>string_value</i><tt>);</tt></pre><p>A numeric value that is exactly equal to the value of an integer (see <a href="xcu_chap01.html#tag_01_07_02"><i>Concepts Derivedfrom the ISO C Standard</i></a> ) shall be converted to a string by the equivalent of a call to the <b>sprintf</b> function (see <ahref="#tag_04_06_13_13">String Functions</a> ) with the string <tt>"%d"</tt> as the <i>fmt</i> argument and the numeric value beingconverted as the first and only <i>expr</i> argument. Any other numeric value shall be converted to a string by the equivalent of acall to the <b>sprintf</b> function with the value of the variable <b>CONVFMT</b> as the <i>fmt</i> argument and the numeric valuebeing converted as the first and only <i>expr</i> argument. The result of the conversion is unspecified if the value of<b>CONVFMT</b> is not a floating-point format specification. This volume of IEEE&nbsp;Std&nbsp;1003.1-2001 specifies no explicitconversions between numbers and strings. An application can force an expression to be treated as a number by adding zero to it, orcan force it to be treated as a string by concatenating the null string ( <tt>""</tt> ) to it.</p><p>A string value shall be considered a <i>numeric string</i> if it comes from one of the following:</p><ol><li><p>Field variables</p></li><li><p>Input from the <i>getline</i>() function</p></li><li><p><b>FILENAME</b></p></li><li><p><b>ARGV</b> array elements</p></li><li><p><b>ENVIRON</b> array elements</p></li><li><p>Array elements created by the <i>split</i>() function</p></li><li><p>A command line variable assignment</p></li><li><p>Variable assignment from another numeric string variable</p></li></ol><p>and after all the following conversions have been applied, the resulting string would lexically be recognized as a <b>NUMBER</b>token as described by the lexical conventions in <a href="#tag_04_06_13_16">Grammar</a> :</p><ul><li><p>All leading and trailing &lt;blank&gt;s are discarded.</p></li><li><p>If the first non- &lt;blank&gt; is <tt>'+'</tt> or <tt>'-'</tt> , it is discarded.</p></li><li><p>Changing each occurrence of the decimal point character from the current locale to a period.</p></li></ul><p>If a <tt>'-'</tt> character is ignored in the preceding description, the numeric value of the <i>numeric string</i> shall be thenegation of the numeric value of the recognized <b>NUMBER</b> token. Otherwise, the numeric value of the <i>numeric string</i>shall be the numeric value of the recognized <b>NUMBER</b> token. Whether or not a string is a <i>numeric string</i> shall berelevant only in contexts where that term is used in this section.</p><p>When an expression is used in a Boolean context, if it has a numeric value, a value of zero shall be treated as false and anyother value shall be treated as true. Otherwise, a string value of the null string shall be treated as false and any other valueshall be treated as true. A Boolean context shall be one of the following:</p><ul><li><p>The first subexpression of a conditional expression</p></li><li><p>An expression operated on by logical NOT, logical AND, or logical OR</p></li><li><p>The second expression of a <b>for</b> statement</p></li><li><p>The expression of an <b>if</b> statement</p></li><li><p>The expression of the <b>while</b> clause in either a <b>while</b> or <b>do</b>... <b>while</b> statement</p></li><li><p>An expression used as a pattern (as in Overall Program Structure)</p></li></ul><p>All arithmetic shall follow the semantics of floating-point arithmetic as specified by the ISO&nbsp;C standard (see <a href="xcu_chap01.html#tag_01_07_02"><i>Concepts Derived from the ISO C Standard</i></a> ).</p><p>The value of the expression:</p><pre><i>expr1</i> <tt>^</tt> <i>expr2</i></pre><p>shall be equivalent to the value returned by the ISO&nbsp;C standard function call:</p><pre><tt>pow(</tt><i>expr1</i><tt>,</tt> <i>expr2</i><tt>)</tt></pre><p>The expression:</p><pre><tt>lvalue ^=</tt> <i>expr</i></pre><p>shall be equivalent to the ISO&nbsp;C standard expression:</p><pre><tt>lvalue = pow(lvalue,</tt> <i>expr</i><tt>)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -