PageRenderTime 26ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/autotools/autogen.html_node/apply-code.html

https://gitlab.com/Gentio/my-pdf
HTML | 171 lines | 128 code | 9 blank | 34 comment | 0 complexity | fc534075d558fcb45c033f301adb3c5c MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
  2. <html>
  3. <!-- This manual is for GNU AutoGen version 5.18, updated August 2015.
  4. Copyright C 1992-2015 by Bruce Korb.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.2 or
  7. any later version published by the Free Software Foundation; with no
  8. Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  9. -->
  10. <!-- Created on August 21, 2015 by texi2html 1.82
  11. texi2html was written by:
  12. Lionel Cons <Lionel.Cons@cern.ch> (original author)
  13. Karl Berry <karl@freefriends.org>
  14. Olaf Bachmann <obachman@mathematik.uni-kl.de>
  15. and many others.
  16. Maintained by: Many creative people.
  17. Send bugs and suggestions to <texi2html-bug@nongnu.org>
  18. -->
  19. <head>
  20. <title>GNU AutoGen - The Automated Program Generator: 3.3.1 Apply Code</title>
  21. <meta name="description" content="GNU AutoGen - The Automated Program Generator: 3.3.1 Apply Code">
  22. <meta name="keywords" content="GNU AutoGen - The Automated Program Generator: 3.3.1 Apply Code">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="texi2html 1.82">
  26. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.smallquotation {font-size: smaller}
  31. pre.display {font-family: serif}
  32. pre.format {font-family: serif}
  33. pre.menu-comment {font-family: serif}
  34. pre.menu-preformatted {font-family: serif}
  35. pre.smalldisplay {font-family: serif; font-size: smaller}
  36. pre.smallexample {font-size: smaller}
  37. pre.smallformat {font-family: serif; font-size: smaller}
  38. pre.smalllisp {font-size: smaller}
  39. span.roman {font-family:serif; font-weight:normal;}
  40. span.sansserif {font-family:sans-serif; font-weight:normal;}
  41. ul.toc {list-style: none}
  42. -->
  43. </style>
  44. <link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css">
  45. </head>
  46. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  47. <a name="apply-code"></a>
  48. <table cellpadding="1" cellspacing="1" border="0">
  49. <tr><td valign="middle" align="left">[<a href="expression-syntax.html#expression-syntax" title="Previous section in reading order"> &lt; </a>]</td>
  50. <td valign="middle" align="left">[<a href="basic-expression.html#basic-expression" title="Next section in reading order"> &gt; </a>]</td>
  51. <td valign="middle" align="left"> &nbsp; </td>
  52. <td valign="middle" align="left">[<a href="Template-File.html#Template-File" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
  53. <td valign="middle" align="left">[<a href="expression-syntax.html#expression-syntax" title="Up section"> Up </a>]</td>
  54. <td valign="middle" align="left">[<a href="Augmenting-AutoGen.html#Augmenting-AutoGen" title="Next chapter"> &gt;&gt; </a>]</td>
  55. <td valign="middle" align="left"> &nbsp; </td>
  56. <td valign="middle" align="left"> &nbsp; </td>
  57. <td valign="middle" align="left"> &nbsp; </td>
  58. <td valign="middle" align="left"> &nbsp; </td>
  59. <td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
  60. <td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  61. <td valign="middle" align="left">[<a href="AutoOpts.html#AutoOpts" title="Index">Index</a>]</td>
  62. <td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  63. </tr></table>
  64. <hr size="1">
  65. <a name="Apply-Code"></a>
  66. <h3 class="subsection">3.3.1 Apply Code</h3>
  67. <p>The &quot;apply code&quot; selected determines the method of evaluating the
  68. expression. There are five apply codes, including the non-use
  69. of an apply code.
  70. </p>
  71. <dl compact="compact">
  72. <dt> &lsquo;<samp>no apply code</samp>&rsquo;</dt>
  73. <dd><p>This is the most common expression type.
  74. Expressions of this sort come in three flavors:
  75. </p>
  76. <dl compact="compact">
  77. <dt> &lsquo;<samp>&lt;value-name&gt;</samp>&rsquo;</dt>
  78. <dd><p>The result is the value of <var>value-name</var>, if defined.
  79. Otherwise it is the empty string.
  80. </p>
  81. </dd>
  82. <dt> &lsquo;<samp>&lt;basic-expr&gt;</samp>&rsquo;</dt>
  83. <dd><p>The result of the basic expression is the result of the full expression,
  84. See section <a href="basic-expression.html#basic-expression">Basic Expression</a>.
  85. </p>
  86. </dd>
  87. <dt> &lsquo;<samp>&lt;value-name&gt; &lt;basic-expr&gt;</samp>&rsquo;</dt>
  88. <dd><p>If there is a defined value for <var>value-name</var>, then the <var>basic-expr</var>
  89. is evaluated. Otherwise, the result is the empty string.
  90. </p></dd>
  91. </dl>
  92. </dd>
  93. <dt> &lsquo;<samp>% &lt;value-name&gt; &lt;basic-expr&gt;</samp>&rsquo;</dt>
  94. <dd><p>If <var>value-name</var> is defined, use <var>basic-expr</var> as a format
  95. string for sprintf. Then, if the <var>basic-expr</var> is either a back-quoted
  96. string or a parenthesized expression, then hand the result to the
  97. appropriate interpreter for further evaluation. Otherwise, for single
  98. and double quote strings, the result is the result of the sprintf operation.
  99. Naturally, if <var>value-name</var> is not defined, the result is the empty
  100. string.
  101. </p>
  102. <p>For example, assume that &lsquo;<samp>fumble</samp>&rsquo; had the string value, &lsquo;<samp>stumble</samp>&rsquo;:
  103. </p><table><tr><td>&nbsp;</td><td><pre class="example">[+ % fumble `printf '%%x\\n' $%s` +]
  104. </pre></td></tr></table>
  105. <p>This would cause the shell to evaluate &quot;&lsquo;<samp>printf '%x\n' $stumble</samp>&rsquo;&quot;.
  106. Assuming that the shell variable &lsquo;<samp>stumble</samp>&rsquo; had a numeric value,
  107. the expression result would be that number, in hex. Note the need
  108. for doubled percent characters and backslashes.
  109. </p>
  110. </dd>
  111. <dt> &lsquo;<samp>? &lt;value-name&gt; &lt;basic-expr-1&gt; &lt;basic-expr-2&gt;</samp>&rsquo;</dt>
  112. <dd><p>Two <var>basic-expr</var>-s are required. If the <var>value-name</var> is
  113. defined, then the first <var>basic-expr-1</var> is evaluated, otherwise
  114. <var>basic-expr-2</var> is.
  115. </p>
  116. </dd>
  117. <dt> &lsquo;<samp>- &lt;value-name&gt; &lt;basic-expr&gt;</samp>&rsquo;</dt>
  118. <dd><p>Evaluate <var>basic-expr</var> only if <var>value-name</var> is <i>not</i> defined.
  119. </p>
  120. </dd>
  121. <dt> &lsquo;<samp>?% &lt;value-name&gt; &lt;basic-expr-1&gt; &lt;basic-expr-2&gt;</samp>&rsquo;</dt>
  122. <dd><p>This combines the functions of &lsquo;<samp>?</samp>&rsquo; and &lsquo;<samp>%</samp>&rsquo;. If <var>value-name</var> is
  123. defined, it behaves exactly like &lsquo;<samp>%</samp>&rsquo;, above, using <var>basic-expr-1</var>.
  124. If not defined, then <var>basic-expr-2</var> is evaluated.
  125. </p>
  126. <p>For example, assume again that &lsquo;<samp>fumble</samp>&rsquo; had the string value,
  127. &lsquo;<samp>stumble</samp>&rsquo;:
  128. </p><table><tr><td>&nbsp;</td><td><pre class="example">[+ ?% fumble `cat $%s` `pwd` +]
  129. </pre></td></tr></table>
  130. <p>This would cause the shell to evaluate &quot;&lsquo;<samp>cat $stumble</samp>&rsquo;&quot;.
  131. If &lsquo;<samp>fumble</samp>&rsquo; were not defined, then the result would be the name
  132. of our current directory.
  133. </p></dd>
  134. </dl>
  135. <hr size="1">
  136. <table cellpadding="1" cellspacing="1" border="0">
  137. <tr><td valign="middle" align="left">[<a href="expression-syntax.html#expression-syntax" title="Previous section in reading order"> &lt; </a>]</td>
  138. <td valign="middle" align="left">[<a href="basic-expression.html#basic-expression" title="Next section in reading order"> &gt; </a>]</td>
  139. <td valign="middle" align="left"> &nbsp; </td>
  140. <td valign="middle" align="left">[<a href="Template-File.html#Template-File" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
  141. <td valign="middle" align="left">[<a href="expression-syntax.html#expression-syntax" title="Up section"> Up </a>]</td>
  142. <td valign="middle" align="left">[<a href="Augmenting-AutoGen.html#Augmenting-AutoGen" title="Next chapter"> &gt;&gt; </a>]</td>
  143. <td valign="middle" align="left"> &nbsp; </td>
  144. <td valign="middle" align="left"> &nbsp; </td>
  145. <td valign="middle" align="left"> &nbsp; </td>
  146. <td valign="middle" align="left"> &nbsp; </td>
  147. <td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
  148. <td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  149. <td valign="middle" align="left">[<a href="AutoOpts.html#AutoOpts" title="Index">Index</a>]</td>
  150. <td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  151. </tr></table>
  152. <p>
  153. <font size="-1">
  154. This document was generated by <em>Bruce Korb</em> on <em>August 21, 2015</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
  155. </font>
  156. <br>
  157. </p>
  158. </body>
  159. </html>