https://wiki.beyondunreal.com/w/index.php?action=history&feed=atom Preprocessor - Revision history 2017-11-18T02:22:51Z Revision history for this page on the wiki MediaWiki 1.25.1 https://wiki.beyondunreal.com/Preprocessor?diff=44366&oldid=prev 113.22.250.67: At the end of the first paragraph, changed "to to" to "to" only. 2011-04-06T23:47:18Z <p>At the end of the first paragraph, changed &quot;to to&quot; to &quot;to&quot; only.</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 23:47, 6 April 2011</td> </tr><tr><td colspan="2" class="diff-lineno" id="L2" >Line 2:</td> <td colspan="2" class="diff-lineno">Line 2:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation via macros.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation via macros.</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Macros are file-scope, meaning a macro defined on line X of the script class ([[.uc]]) file is only usable on lines X+n in that file and not in any other files (unless it is included in another .uc file). However, you can create a [[.uci]] file <del class="diffchange diffchange-inline">to </del>to include macros in your .uc file.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Macros are file-scope, meaning a macro defined on line X of the script class ([[.uc]]) file is only usable on lines X+n in that file and not in any other files (unless it is included in another .uc file). However, you can create a [[.uci]] file to include macros in your .uc file.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Command-line Switches==</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Command-line Switches==</div></td></tr> </table> 113.22.250.67 https://wiki.beyondunreal.com/Preprocessor?diff=43915&oldid=prev Eliot: Typos etc 2010-08-25T21:25:12Z <p>Typos etc</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 21:25, 25 August 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L1" >Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Starting with [[Unreal Engine 3]] The UnrealScript compiler now supports a preprocessor. &#160;</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Starting with [[Unreal Engine 3]] The UnrealScript compiler now supports a <ins class="diffchange diffchange-inline">[[wp:</ins>preprocessor<ins class="diffchange diffchange-inline">|preprocessor]]</ins>. &#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation via macros.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation via macros.</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Macros are file-scope, meaning a macro defined on line X of the script class (.uc) file is only usable on lines X+n in that file and not in any other files (unless it is included in another .uc file). However, you can create a .uci file to to include macros in your .uc file.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Macros are file-scope, meaning a macro defined on line X of the script class (<ins class="diffchange diffchange-inline">[[</ins>.uc<ins class="diffchange diffchange-inline">]]</ins>) file is only usable on lines X+n in that file and not in any other files (unless it is included in another .uc file). However, you can create a <ins class="diffchange diffchange-inline">[[</ins>.uci<ins class="diffchange diffchange-inline">]] </ins>file to to include macros in your .uc file.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Command-line Switches==</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Command-line Switches==</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L17" >Line 17:</td> <td colspan="2" class="diff-lineno">Line 18:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`define===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`define===</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''`define &lt;macroname&gt;[&lt;(paramA[,paramB...])&gt;] [&lt;macrodefinition&gt;]''&lt;br&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''`define &lt;macroname&gt;[&lt;(paramA[,paramB...])&gt;] [&lt;macrodefinition&gt;]''&lt;br&gt;</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Defines the named macro to expand to the given definition. Parameters for the macro are specified in a typeless function parameter list immediately after the name of the macro. In the macro definition, the parameters are referenced by name and prefixed with a backtick. Although I have not yet verified, my research indicated that you can also use the the special macro ''`#'' to <del class="diffchange diffchange-inline">repesent </del>the number of parameters specified, although I have not verified this though. If you don't give the macro a definition, the macro is still defined but expands to an empty string. You can also define a macro to represent a constant value.&#160; &#160;</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Defines the named macro to expand to the given definition. Parameters for the macro are specified in a typeless function parameter list immediately after the name of the macro. In the macro definition, the parameters are referenced by name and prefixed with a backtick. Although I have not yet verified, my research indicated that you can also use the the special macro ''`#'' to <ins class="diffchange diffchange-inline">represent </ins>the number of parameters specified, although I have not verified this though. If you don't give the macro a definition, the macro is still defined but expands to an empty string. You can also define a macro to represent a constant value.&#160; &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Equivalently, the name of the macro can be enclosed in { } after the tick as in ''`{hello}''. This makes it possible to &quot;insert&quot; the expansion of a macro into the middle of text that does not have conveniently placed whitespace. &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Equivalently, the name of the macro can be enclosed in { } after the tick as in ''`{hello}''. This makes it possible to &quot;insert&quot; the expansion of a macro into the middle of text that does not have conveniently placed whitespace. &#160;</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L37" >Line 37:</td> <td colspan="2" class="diff-lineno">Line 38:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Basically, this is conditional compilation. The text between ''`if'' and either ''`else'' (if present) or ''`endif'' are emitted into the processed output if the condition is true (if it is expanded to a non-empty string); if the condition is not true, only the end-of-line characters are emitted so that the line numbers in the processed text match up with those in the original text.&#160; The text between the (optional) ''`else'' and ''`endif'' are emitted if the original condition is false. &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Basically, this is conditional compilation. The text between ''`if'' and either ''`else'' (if present) or ''`endif'' are emitted into the processed output if the condition is true (if it is expanded to a non-empty string); if the condition is not true, only the end-of-line characters are emitted so that the line numbers in the processed text match up with those in the original text.&#160; The text between the (optional) ''`else'' and ''`endif'' are emitted if the original condition is false. &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&#160; &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&#160; &#160;</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This may be obvious, but any macros used in the non-emitted code (in the ''`else'' if the <del class="diffchange diffchange-inline">statment </del>is true, or before the ''`else'' if the statement is true) are not evaluated (except for nested ''`if'' blocks).</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This may be obvious, but any macros used in the non-emitted code (in the ''`else'' if the <ins class="diffchange diffchange-inline">statement </ins>is true, or before the ''`else'' if the statement is true) are not evaluated (except for nested ''`if'' blocks).</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&lt;uscript&gt;`if(`isdefined(SOME_CONST))</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&lt;uscript&gt;`if(`isdefined(SOME_CONST))</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&#160;&#160; &#160; // do some code here if SOME_CONST can be expanded to a non-empty string...</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&#160;&#160; &#160; // do some code here if SOME_CONST can be expanded to a non-empty string...</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L49" >Line 49:</td> <td colspan="2" class="diff-lineno">Line 50:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`include===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`include===</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''`include(&lt;filename&gt;)''&lt;br&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''`include(&lt;filename&gt;)''&lt;br&gt;</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Includes the text within the file &lt;filename&gt; at the macro's location in the code. By default, &lt;filename&gt; is relative to the directory specified by the EditPackagesInPath of the [Editor.EditorEngine] section of UTGame.ini file. If you specify only the filename (no directory), it will search for the include file in the classes directory for the package being compiled.&#160; &#160;</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Includes the text within the file &lt;filename&gt; at the macro's location in the code. By default, &lt;filename&gt; is relative to the directory specified by the <ins class="diffchange diffchange-inline">'''</ins>EditPackagesInPath<ins class="diffchange diffchange-inline">''' </ins>of the <ins class="diffchange diffchange-inline">&lt;code&gt;</ins>[Editor.EditorEngine]<ins class="diffchange diffchange-inline">&lt;/code&gt; </ins>section of <ins class="diffchange diffchange-inline">&lt;code&gt;</ins>UTGame.ini<ins class="diffchange diffchange-inline">&lt;/code&gt; </ins>file. If you specify only the filename (no directory), it will search for the include file in the classes directory for the package being compiled.&#160; &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&lt;uscript&gt;`include( MyStuff.uci )</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>&lt;uscript&gt;`include( MyStuff.uci )</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td colspan="2" class="diff-lineno" id="L73" >Line 73:</td> <td colspan="2" class="diff-lineno">Line 74:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>There is a good reason to use the ''`log'' and ''`warn'' macros instead of '''LogInternal()''' and '''WarnInternal()''' functions. If you use the -final_release command line option when you &quot;make&quot;, it will turn off all logging because ''`log'' and ''`warn'' are empty defines when using -final_release. However, the '''LogInternal()''' and '''WarnInternal()''' function(s) will still be called if you use them directly.&#160; Using the macro to write to the log for debug info will not incur a function call overhead in a release build. &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>There is a good reason to use the ''`log'' and ''`warn'' macros instead of '''LogInternal()''' and '''WarnInternal()''' functions. If you use the -final_release command line option when you &quot;make&quot;, it will turn off all logging because ''`log'' and ''`warn'' are empty defines when using -final_release. However, the '''LogInternal()''' and '''WarnInternal()''' function(s) will still be called if you use them directly.&#160; Using the macro to write to the log for debug info will not incur a function call overhead in a release build. &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>More importantly, it also appears that calls to LogInternal (or anything *Internal) generate <del class="diffchange diffchange-inline">compile </del>errors when using -final_release.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>More importantly, it also appears that calls to <ins class="diffchange diffchange-inline">'''</ins>LogInternal<ins class="diffchange diffchange-inline">''' </ins>(or anything *Internal) generate <ins class="diffchange diffchange-inline">[[compiler </ins>errors<ins class="diffchange diffchange-inline">]] </ins>when using -final_release.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`log / `warn===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`log / `warn===</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">''</del>`log(string OutputString, optional bool bRequiredCondition, optional name LogTag)<del class="diffchange diffchange-inline">''&lt;br&gt;</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">{{code|</ins>`log(<ins class="diffchange diffchange-inline">[[</ins>string<ins class="diffchange diffchange-inline">]] </ins>OutputString, <ins class="diffchange diffchange-inline">[[</ins>optional<ins class="diffchange diffchange-inline">]] [[</ins>bool<ins class="diffchange diffchange-inline">]] </ins>bRequiredCondition, <ins class="diffchange diffchange-inline">[[</ins>optional<ins class="diffchange diffchange-inline">]] [[</ins>name<ins class="diffchange diffchange-inline">]] </ins>LogTag)<ins class="diffchange diffchange-inline">}}</ins></div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">''</del>`warn(string OutputString, optional bool bRequiredCondition)<del class="diffchange diffchange-inline">''&lt;br&gt;</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">{{code|</ins>`warn(<ins class="diffchange diffchange-inline">[[</ins>string<ins class="diffchange diffchange-inline">]] </ins>OutputString, <ins class="diffchange diffchange-inline">[[</ins>optional<ins class="diffchange diffchange-inline">]] [[</ins>bool<ins class="diffchange diffchange-inline">]] </ins>bRequiredCondition)<ins class="diffchange diffchange-inline">}}</ins></div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Wrapper macros for the LogInternal and WarnInternal functions declared in Object.uc. If bRequiredCondition is specified, the message will only be logged if the condition is true.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Wrapper macros for the <ins class="diffchange diffchange-inline">'''</ins>LogInternal<ins class="diffchange diffchange-inline">''' </ins>and <ins class="diffchange diffchange-inline">'''</ins>WarnInternal<ins class="diffchange diffchange-inline">''' </ins>functions declared in Object.uc. If <ins class="diffchange diffchange-inline">'''</ins>bRequiredCondition<ins class="diffchange diffchange-inline">''' </ins>is specified, the message will only be logged if the condition is true.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Both macros are disabled if scripts are compiled with the -final_release command line option. &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Both macros are disabled if scripts are compiled with the -final_release command line option. &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`logd===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`logd===</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">''</del>`logd(string OutputString, optional bool bRequiredCondition, optional name LogTag)<del class="diffchange diffchange-inline">''&lt;br&gt;</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">{{code|</ins>`logd(<ins class="diffchange diffchange-inline">[[</ins>string<ins class="diffchange diffchange-inline">]] </ins>OutputString, <ins class="diffchange diffchange-inline">[[</ins>optional<ins class="diffchange diffchange-inline">]] [[</ins>bool<ins class="diffchange diffchange-inline">]] </ins>bRequiredCondition, <ins class="diffchange diffchange-inline">[[</ins>optional<ins class="diffchange diffchange-inline">]] [[</ins>name<ins class="diffchange diffchange-inline">]] </ins>LogTag)<ins class="diffchange diffchange-inline">}}</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Identical to the `log macro, except that it is only enabled if scripts are compiled in debug mode. &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Identical to the `log macro, except that it is only enabled if scripts are compiled in debug mode. &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This macro is disabled if scripts are compiled with the -final_release switch. &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This macro is disabled if scripts are compiled with the -final_release switch. &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`assert===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===`assert===</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">''</del>`assert(bool bCondition)<del class="diffchange diffchange-inline">''&lt;br&gt;</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">{{code|</ins>`assert(<ins class="diffchange diffchange-inline">[[</ins>bool<ins class="diffchange diffchange-inline">]] </ins>bCondition)<ins class="diffchange diffchange-inline">}}</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Wrapper macro for the Assert intrinsic expression. &#160;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Wrapper macro for the Assert intrinsic expression. &#160;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> </table> Eliot https://wiki.beyondunreal.com/Preprocessor?diff=42996&oldid=prev Eliot: /* The Preprocessor */ 2010-04-21T23:46:26Z <p>‎<span dir="auto"><span class="autocomment">The Preprocessor</span></span></p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 23:46, 21 April 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L1" >Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">==</del>The <del class="diffchange diffchange-inline">Preprocessor==</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">Starting with [[Unreal Engine 3]] </ins>The UnrealScript compiler now supports a preprocessor. &#160;</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">The UT3 </del>UnrealScript compiler now supports a preprocessor. The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation via macros.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation via macros.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Macros are file-scope, meaning a macro defined on line X of the script class (.uc) file is only usable on lines X+n in that file and not in any other files (unless it is included in another .uc file). However, you can create a .uci file to to include macros in your .uc file.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Macros are file-scope, meaning a macro defined on line X of the script class (.uc) file is only usable on lines X+n in that file and not in any other files (unless it is included in another .uc file). However, you can create a .uci file to to include macros in your .uc file.</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Command-line Switches==</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Command-line Switches==</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===-debug===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===-debug===</div></td></tr> </table> Eliot https://wiki.beyondunreal.com/Preprocessor?diff=42994&oldid=prev Eliot: Added the us navbox 2010-04-21T17:03:14Z <p>Added the us navbox</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 17:03, 21 April 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L89" >Line 89:</td> <td colspan="2" class="diff-lineno">Line 89:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This macro is disabled if scripts are compiled with the -final_release switch.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>This macro is disabled if scripts are compiled with the -final_release switch.</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{navbox unrealscript}}</ins></div></td></tr> </table> Eliot https://wiki.beyondunreal.com/Preprocessor?diff=32890&oldid=prev HoMeRSiMpSoN: New page: ==The Preprocessor== The UT3 UnrealScript compiler now supports a preprocessor. The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation ... 2008-08-15T15:19:16Z <p>New page: ==The Preprocessor== The UT3 UnrealScript compiler now supports a preprocessor. The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation ...</p> <p><b>New page</b></p><div>==The Preprocessor==<br /> The UT3 UnrealScript compiler now supports a preprocessor. The preprocessor works much like the C++ preprocessor and is perfect for supporting conditional compilation via macros.<br /> Macros are file-scope, meaning a macro defined on line X of the script class (.uc) file is only usable on lines X+n in that file and not in any other files (unless it is included in another .uc file). However, you can create a .uci file to to include macros in your .uc file.<br /> ==Command-line Switches==<br /> ===-debug===<br /> Using a -debug command line option causes a ''`debug'' macro to be defined.<br /> ===-final_release===<br /> Using a -final-release command line option causes UPP to define the macro ''`final_release'', as well as disable all wrapper macros (''`log'', ''`logd'', ''`warn'', ''`assert''). (see below).<br /> ===-nopreprocess===<br /> Using a -nopreprocess command line option turns off all macro and comment preprocessing.<br /> ===-intermediate===<br /> Using a -intermediate command line option will save the processed versions of the files compiled (for tracking down errors in macros) to &lt;My Documents&gt;\PreprocessedFiles\&lt;package&gt;\&lt;class&gt;.uc<br /> <br /> ==Using Macros==<br /> <br /> ===`define===<br /> ''`define &lt;macroname&gt;[&lt;(paramA[,paramB...])&gt;] [&lt;macrodefinition&gt;]''&lt;br&gt;<br /> Defines the named macro to expand to the given definition. Parameters for the macro are specified in a typeless function parameter list immediately after the name of the macro. In the macro definition, the parameters are referenced by name and prefixed with a backtick. Although I have not yet verified, my research indicated that you can also use the the special macro ''`#'' to repesent the number of parameters specified, although I have not verified this though. If you don't give the macro a definition, the macro is still defined but expands to an empty string. You can also define a macro to represent a constant value. <br /> <br /> Equivalently, the name of the macro can be enclosed in { } after the tick as in ''`{hello}''. This makes it possible to &quot;insert&quot; the expansion of a macro into the middle of text that does not have conveniently placed whitespace. <br /> &lt;uscript&gt;hippo`{hello}potamus<br /> &lt;/uscript&gt;<br /> Other examples:<br /> &lt;uscript&gt;`define SOME_CONST 1<br /> <br /> `define hello &quot;Hello, World!&quot;<br /> <br /> `define SomeMacro(param1, param2) CallMyFunction(`param1, `param2)&lt;/uscript&gt;<br /> <br /> ===`if / `else / `endif===<br /> ''`if(&lt;string&gt;)''<br /> <br /> ''`else''<br /> <br /> ''`endif''&lt;br&gt;<br /> Basically, this is conditional compilation. The text between ''`if'' and either ''`else'' (if present) or ''`endif'' are emitted into the processed output if the condition is true (if it is expanded to a non-empty string); if the condition is not true, only the end-of-line characters are emitted so that the line numbers in the processed text match up with those in the original text. The text between the (optional) ''`else'' and ''`endif'' are emitted if the original condition is false. <br /> <br /> This may be obvious, but any macros used in the non-emitted code (in the ''`else'' if the statment is true, or before the ''`else'' if the statement is true) are not evaluated (except for nested ''`if'' blocks).<br /> &lt;uscript&gt;`if(`isdefined(SOME_CONST))<br /> // do some code here if SOME_CONST can be expanded to a non-empty string...<br /> `endif<br /> <br /> `if(`isdefined(SOME_OTHER_CONST))<br /> // do some code here if SOME_CONST can be expanded to a non-empty string...<br /> `else<br /> //do some code here if SOME_CONST can NOT be expanded to a non-empty string...<br /> `endif&lt;/uscript&gt;<br /> ===`include===<br /> ''`include(&lt;filename&gt;)''&lt;br&gt;<br /> Includes the text within the file &lt;filename&gt; at the macro's location in the code. By default, &lt;filename&gt; is relative to the directory specified by the EditPackagesInPath of the [Editor.EditorEngine] section of UTGame.ini file. If you specify only the filename (no directory), it will search for the include file in the classes directory for the package being compiled. <br /> &lt;uscript&gt;`include( MyStuff.uci )<br /> <br /> `include( MyPackage/Classes/MyGlobals.uci )<br /> &lt;/uscript&gt;<br /> ===`isdefined / `notdefined===<br /> ''`isdefined(&lt;macroname&gt;)''&lt;br&gt;<br /> ''`notdefined(&lt;macroname&gt;)''&lt;br&gt;<br /> Evaluates to the string &quot;1&quot; if the macro is (''`isdefined'') or is not (''`notdefined'') defined, regardless of the macros definition. This useful for conditional compilation. You can include code only in debug or release builds, or based on other defined constants.<br /> &lt;uscript&gt;`if(`isdefined(SOME_CONST))<br /> // do some code here if SOME_CONST is defined...<br /> `endif<br /> <br /> `if(`notdefined(SOME_CONST))<br /> // do some code here if SOME_CONST is NOT defined...<br /> `endif<br /> &lt;/uscript&gt;<br /> ===`undefine===<br /> ''undefine(&lt;macroname&gt;)''&lt;br&gt;<br /> Remove the current definition of &lt;macroname&gt;. <br /> &lt;uscript&gt;`undefine(SOME_CONST)&lt;/uscript&gt;<br /> ==Predefined Macros for Logging==<br /> There is a good reason to use the ''`log'' and ''`warn'' macros instead of '''LogInternal()''' and '''WarnInternal()''' functions. If you use the -final_release command line option when you &quot;make&quot;, it will turn off all logging because ''`log'' and ''`warn'' are empty defines when using -final_release. However, the '''LogInternal()''' and '''WarnInternal()''' function(s) will still be called if you use them directly. Using the macro to write to the log for debug info will not incur a function call overhead in a release build. <br /> <br /> More importantly, it also appears that calls to LogInternal (or anything *Internal) generate compile errors when using -final_release.<br /> ===`log / `warn===<br /> ''`log(string OutputString, optional bool bRequiredCondition, optional name LogTag)''&lt;br&gt;<br /> ''`warn(string OutputString, optional bool bRequiredCondition)''&lt;br&gt;<br /> Wrapper macros for the LogInternal and WarnInternal functions declared in Object.uc. If bRequiredCondition is specified, the message will only be logged if the condition is true.<br /> <br /> Both macros are disabled if scripts are compiled with the -final_release command line option. <br /> ===`logd===<br /> ''`logd(string OutputString, optional bool bRequiredCondition, optional name LogTag)''&lt;br&gt;<br /> Identical to the `log macro, except that it is only enabled if scripts are compiled in debug mode. <br /> <br /> This macro is disabled if scripts are compiled with the -final_release switch. <br /> ===`assert===<br /> ''`assert(bool bCondition)''&lt;br&gt;<br /> Wrapper macro for the Assert intrinsic expression. <br /> <br /> This macro is disabled if scripts are compiled with the -final_release switch.</div> HoMeRSiMpSoN