autodoc.git / modref / ex / cpp_3A_3A / _23define.html

version» Context lines:

autodoc.git/modref/ex/cpp_3A_3A/_23define.html:67:   <hr />   <dl class='group--doc'>   <dt class='head--type'><span class='homogen--type'>Directive</span>   <span class='homogen--name'><b>#define</b></span>   </dt>   <dd><p><code class='directive'>#define</code></p></dd>      <dt class='head--doc'>Description</dt>   <dd class='body--doc'><p>This directive is used to define or redefine a cpp macro.</p>   <p> The simplest way to use define is to write</p> - <pre><code>#define <identifier> <replacement string></code></pre><p>which will cause all subsequent occurances of <tt><b><i>&lt;identifier</i></b></tt> + <pre><code>#define &lt;identifier&gt; &lt;replacement string&gt;</code></pre><p>which will cause all subsequent occurances of <tt><b><i>&lt;identifier</i></b></tt>    to be replaced with the <tt><i>&lt;replacement string&gt;</i></tt>.</p>   <p> Define also has the capability to use arguments, thus a line like</p> - <pre><code>#define <identifier>(arg1, arg2) <replacement string></code></pre><p>would cause <tt><b><i>&lt;identifer&gt;</i></b></tt> to be a macro. All occurances of + <pre><code>#define &lt;identifier&gt;(arg1, arg2) &lt;replacement string&gt;</code></pre><p>would cause <tt><b><i>&lt;identifer&gt;</i></b></tt> to be a macro. All occurances of    '<tt><b><i>&lt;identifier&gt;</i></b>(something1,something2d)</tt>' would be replaced    with the <tt><i>&lt;replacement string&gt;</i></tt>.    And in the <tt><i>&lt;replacement string&gt;</i></tt>, <tt>arg1</tt> and <tt>arg2</tt>    will be replaced with <tt>something1</tt> and <tt>something2</tt>.</p>   </dd></dl>       </article>    <footer>    <hr size="1" noshade="1" />    </footer>    </div>    </div>    </body>   <script>PikeDoc.current = {"link":"ex/cpp_3A_3A/_23define.html","name":"#define"};</script>   <script src='../../ex/cpp_3A_3A/index.js'></script>   <script src='../../ex/cpp_3A_3A/load_index.js'></script>   </html>