<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>#ifndef</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" /> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="ifdef.html" title="#ifdef" /> <link rel="next" href="dollar.html" title="$NAME" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">#ifndef</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="ifdef.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="dollar.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="ifndef"></a> <div class="titlepage"></div> <a id="IndexIfndefOrch" class="indexterm"></a> <a id="IndexIfndef" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">#ifndef</span> </h2> <p>#ifndef — Conditional reading of code. </p> </div> <div class="refsect1"> <a id="idm281472953915096"></a> <h2>Description</h2> <p> If the specified macro is not defined then <span class="emphasis"><em>#ifndef</em></span> can incorporate text into an orchestra upto the next <span class="emphasis"><em>#end</em></span>. This is similar to, but independent of, the <a class="link" href="ScoreMacros.html" title="Score Macros"><em class="citetitle">macro system in the score language</em></a>. </p> </div> <div class="refsect1"> <a id="idm281472953912008"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>#ifndef</strong></span> NAME</pre> <pre class="synopsis">....</pre> <pre class="synopsis"><span class="command"><strong>#else</strong></span> </pre> <pre class="synopsis">....</pre> <pre class="synopsis"><span class="command"><strong>#end</strong></span> </pre> </div> <div class="refsect1"> <a id="idm281472953906088"></a> <h2>Performance</h2> <p> Note that the <span class="emphasis"><em>#ifndef</em></span> can be nested, like in the C preprocessor language. </p> </div> <div class="refsect1"> <a id="idm281472953904376"></a> <h2>Examples</h2> <p> Here is a simple example of the conditional. </p> <div class="example"> <a id="idm281472953903368"></a> <p class="title"> <strong>Example 18. Simple example of the #ifndef form.</strong> </p> <div class="example-contents"> <pre class="programlisting"> <span class="omacro">#define</span> final ## <span class="oblock">instr</span> 1 <span class="omacro">#ifndef</span> final <span class="opc">print</span> "calling oscil" <span class="omacro">#end</span> a1 <span class="opc">oscil</span> 32000,440,1 out <span class="opc">a1</span> <span class="oblock">endin</span></pre> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1"> <a id="idm281472953896168"></a> <h2>See Also</h2> <p> <a class="link" href="dollar.html" title="$NAME"><em class="citetitle">$NAME</em></a>, <a class="link" href="define.html" title="#define"><em class="citetitle">#define</em></a>, <a class="link" href="ifdef.html" title="#ifdef"><em class="citetitle">#ifdef</em></a>. </p> </div> <div class="refsect1"> <a id="idm281472953892104"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: John ffitch</td> </tr> <tr> <td>University of Bath/Codemist Ltd.</td> </tr> <tr> <td>Bath, UK</td> </tr> <tr> <td>April 2005</td> </tr> </table> <p> </p> <p>New in Csound5 (and 4.23f13)</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="ifdef.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="dollar.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">#ifdef </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> $NAME</td> </tr> </table> </div> </body> </html>