https://wiki.beyondunreal.com/w/index.php?action=history&feed=atom Operators - Revision history 2017-11-18T02:44:34Z Revision history for this page on the wiki MediaWiki 1.25.1 https://wiki.beyondunreal.com/Operators?diff=44325&oldid=prev Wormbo: some clarifications here and there 2011-03-05T10:04:11Z <p>some clarifications here and there</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 10:04, 5 March 2011</td> </tr><tr><td colspan="2" class="diff-lineno" id="L17" >Line 17:</td> <td colspan="2" class="diff-lineno">Line 17:</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>===Operator precedence===</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>===Operator precedence===</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>Operator precedence controls, how tightly an operator binds its operands. A precedence value can only be specified for infix operators (pre/postfix operators bind as tightly as possible), with lower numbers binding more tightly. For example, &lt;code&gt;*&lt;/code&gt; has a precedence of 16, while &lt;code&gt;+&lt;/code&gt; has 20. That means &lt;code&gt;*&lt;/code&gt; binds more tightly than &lt;code&gt;+&lt;/code&gt;, so &lt;code&gt;a * b + c * d&lt;/code&gt; is evaluated as &lt;code&gt;(a * b) + (c * d)&lt;/code&gt;.</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>Operator precedence controls, how tightly an operator binds its operands. A precedence value can only be specified for infix operators (pre/postfix operators bind as tightly as possible), with lower numbers binding more tightly. For example, &lt;code&gt;*&lt;/code&gt; has a precedence of 16, while &lt;code&gt;+&lt;/code&gt; has 20. That means &lt;code&gt;*&lt;/code&gt; binds more tightly than &lt;code&gt;+&lt;/code&gt;, so &lt;code&gt;a * b + c * d&lt;/code&gt; is evaluated as &lt;code&gt;(a * b) + (c * d)&lt;/code&gt;<ins class="diffchange diffchange-inline">. It is possible to define different precedence values for overloaded operators. For example the &lt;code&gt;-=&lt;/code&gt; operator as combined subtract and assign for numeric values has a precedence of 34, while the &lt;code&gt;-=&lt;/code&gt; operator for removing occurrences of a string in another string has a precedence of 45</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;"></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 following table lists the operator precedence for the default operators defined across the various engine versions. Operators further up in the table bind more tightly.</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 following table lists the operator precedence for the default operators defined across the various engine versions. Operators further up in the table bind more tightly.</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L65" >Line 65:</td> <td colspan="2" class="diff-lineno">Line 65:</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>u = v * f * g;</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>u = v * f * g;</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;</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;</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 code evaluates as &lt;code&gt;(v * f) * g&lt;/code&gt;, that means both operators are &lt;code&gt;vector * float&lt;/code&gt;. If this was written as &lt;code&gt;v * (f * g)&lt;/code&gt;, the second operator would actually be &lt;code&gt;float * float&lt;/code&gt;. It doesn't matter much for the result in this case, but you will have to keep this effect in mind for [[int]] operations like division or bit shifting<del class="diffchange diffchange-inline">, </del>which <del class="diffchange diffchange-inline">are usually not reversible</del>. For example the expression &lt;code&gt;i / n * n&lt;/code&gt; returns the largest multiple of n that is less than or equal to i if both variables are declared of type int.</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 code evaluates as &lt;code&gt;(v * f) * g&lt;/code&gt;, that means both operators are &lt;code&gt;vector * float&lt;/code&gt;. If this was written as &lt;code&gt;v * (f * g)&lt;/code&gt;, the second operator would actually be &lt;code&gt;float * float&lt;/code&gt;. It doesn't matter much for the result in this case, but you will have to keep this effect in mind for [[int]] operations like division or bit shifting<ins class="diffchange diffchange-inline">. For these operations it matters </ins>which <ins class="diffchange diffchange-inline">order you perform the operations</ins>. For example the expression &lt;code&gt;i / n * n&lt;/code&gt; returns the largest multiple of n that is less than or equal to i if both variables are declared of type int<ins class="diffchange diffchange-inline">, while &lt;code&gt;i * n / n&lt;/code&gt; results in i again</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;"></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>You might find the left-associativity counter-intuitive if you want to do something like:</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>You might find the left-associativity counter-intuitive if you want to do something like:</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L134" >Line 134:</td> <td colspan="2" class="diff-lineno">Line 134:</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;</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;</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><del class="diffchange diffchange-inline">In </del>[[Unreal Engine 2]] the newly created object receives a call to its ''Created()'' function before the &lt;code&gt;new&lt;/code&gt; operator returns.</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">Only in </ins>[[Unreal Engine 2]] the newly created object receives a call to its ''Created()'' function before the &lt;code&gt;new&lt;/code&gt; operator returns<ins class="diffchange diffchange-inline">. Other engine generations do not provide any generic initialization events</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;"></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>{{navbox unrealscript}}</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>{{navbox unrealscript}}</div></td></tr> </table> Wormbo https://wiki.beyondunreal.com/Operators?diff=44322&oldid=prev Wormbo: /* Operator precedence */ 2011-03-04T13:56:25Z <p>‎<span dir="auto"><span class="autocomment">Operator precedence</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 13:56, 4 March 2011</td> </tr><tr><td colspan="2" class="diff-lineno" id="L33" >Line 33:</td> <td colspan="2" class="diff-lineno">Line 33:</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>|align=&quot;center&quot;| 20 || &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt; || addition, subtraction</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>|align=&quot;center&quot;| 20 || &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt; || addition, subtraction</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>|-</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>|-</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>|align=&quot;center&quot;| 22 || &lt;code&gt;&lt;&lt;&lt;/code&gt;, &lt;code&gt;&gt;&gt;&lt;/code&gt;, &lt;code&gt;&gt;&gt;&gt;&lt;/code&gt; || [[wp:Bitwise operation#Bit_shifts|bit shifting]], vector transformation</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>|align=&quot;center&quot;| 22 || &lt;code&gt;&lt;&lt;&lt;/code&gt;, &lt;code&gt;&gt;&gt;&lt;/code&gt;, &lt;code&gt;&gt;&gt;&gt;&lt;/code&gt; || [[wp:Bitwise operation#Bit_shifts|bit shifting]], <ins class="diffchange diffchange-inline">[[</ins>vector<ins class="diffchange diffchange-inline">]] </ins>transformation</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>|-</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>|-</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>|align=&quot;center&quot;| 24 || &lt;code&gt;&lt;&lt;/code&gt;, &lt;code&gt;&gt;&lt;/code&gt;, &lt;code&gt;&lt;=&lt;/code&gt;, &lt;code&gt;&gt;=&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;~=&lt;/code&gt;, &lt;code&gt;ClockwiseFrom&lt;/code&gt; || comparison</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>|align=&quot;center&quot;| 24 || &lt;code&gt;&lt;&lt;/code&gt;, &lt;code&gt;&gt;&lt;/code&gt;, &lt;code&gt;&lt;=&lt;/code&gt;, &lt;code&gt;&gt;=&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;, &lt;code&gt;~=&lt;/code&gt;, &lt;code&gt;ClockwiseFrom&lt;/code&gt; || comparison</div></td></tr> </table> Wormbo https://wiki.beyondunreal.com/Operators?diff=43387&oldid=prev Wormbo: /* New operator */ object name is a string in UE3 as well 2010-05-28T21:16:05Z <p>‎<span dir="auto"><span class="autocomment">New operator: </span> object name is a string in UE3 as well</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 21:16, 28 May 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L104" >Line 104:</td> <td colspan="2" class="diff-lineno">Line 104:</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>Arguments:</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>Arguments:</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>; outer : The value for the new object's Outer variable. The default value is &lt;code&gt;None&lt;/code&gt;, which means the object is created within the &quot;transient package&quot;, a virtual package for runtime objects.&lt;br/&gt;If the class to create an object from is declared [[within]] another class, then the ''outer'' argument must be an object of that class or a subclass.</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>; outer : The value for the new object's Outer variable. The default value is &lt;code&gt;None&lt;/code&gt;, which means the object is created within the &quot;transient package&quot;, a virtual package for runtime objects.&lt;br/&gt;If the class to create an object from is declared [[within]] another class, then the ''outer'' argument must be an object of that class or a subclass.</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>; name : The name for the new object. <del class="diffchange diffchange-inline">In </del>[[Unreal Engine <del class="diffchange diffchange-inline">2</del>]] <del class="diffchange diffchange-inline">this must be </del>a [[<del class="diffchange diffchange-inline">string</del>]], <del class="diffchange diffchange-inline">other engine generations expect </del>a [[<del class="diffchange diffchange-inline">name</del>]] <del class="diffchange diffchange-inline">here</del>. <del class="diffchange diffchange-inline">Leaving </del>the name empty assigns a default name consisting of the class name and a number. Unreal Engine 2 might not append the number unless the engine was started with the commandline parameter &lt;code&gt;-makenames&lt;/code&gt;. Specifying the name of an existing object of the same class within the same outer object may have unexpected results if the existing object is still in use as it will be replaced by the new object.</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>; name : The name for the new object. [[Unreal Engine <ins class="diffchange diffchange-inline">1</ins>]] <ins class="diffchange diffchange-inline">expects </ins>a [[<ins class="diffchange diffchange-inline">name</ins>]] <ins class="diffchange diffchange-inline">value here</ins>, <ins class="diffchange diffchange-inline">but starting with [[Unreal Engine 2]] this must be </ins>a [[<ins class="diffchange diffchange-inline">string</ins>]] <ins class="diffchange diffchange-inline">value</ins>. <ins class="diffchange diffchange-inline">Omitting </ins>the name <ins class="diffchange diffchange-inline">or passing &quot;None&quot; or the </ins>empty <ins class="diffchange diffchange-inline">string </ins>assigns a default name consisting of the class name and a number<ins class="diffchange diffchange-inline">, in [[Unreal Engine 3]] separated by an underscore character</ins>. Unreal Engine 2 might not append the number unless the engine was started with the commandline parameter &lt;code&gt;-makenames&lt;/code&gt;. Specifying the name of an existing object of the same class within the same outer object may have unexpected results if the existing object is still in use as it will be replaced by the new object.</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>; flags : Specifies object flags for the new object. Only use this if you know what you're doing!</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>; flags : Specifies object flags for the new object. Only use this if you know what you're doing!</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>; class : The class to create an object of. The specified class must not be [[abstract]] or extend [[Actor]]. (Actors must be created with the [[Spawn() function]].)</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>; class : The class to create an object of. The specified class must not be [[abstract]] or extend [[Actor]]. (Actors must be created with the [[Spawn() function]].)</div></td></tr> </table> Wormbo https://wiki.beyondunreal.com/Operators?diff=42907&oldid=prev Wormbo: /* Special operators */ 2010-04-15T11:51:10Z <p>‎<span dir="auto"><span class="autocomment">Special operators</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 11:51, 15 April 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L76" >Line 76:</td> <td colspan="2" class="diff-lineno">Line 76:</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>==Special operators==</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>==Special operators==</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;">The following operators are not declared anywhere in UnrealScript, they &quot;simply exist&quot; and have special behavior that cannot be put in any kind of declaration available in the language.</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;"></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>===Assignment operator===</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>===Assignment operator===</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 assignment operator &lt;code&gt;=&lt;/code&gt; implicitly exists for all possible data types, except [[static arrays]]. It could informally be described with the following declaration:</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 assignment operator &lt;code&gt;=&lt;/code&gt; implicitly exists for all possible data types, except [[static arrays]]. It could informally be described with the following declaration:</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L99" >Line 99:</td> <td colspan="2" class="diff-lineno">Line 101:</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>===New operator===</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>===New operator===</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 special operator &lt;code&gt;new&lt;/code&gt; can be used to create non-[[Actor]] objects. In its simplest form it works like a prefix operator, but it can also take additional parameters similar to a [[function call]]. The general syntax for using the &lt;code&gt;new&lt;/code&gt; operator is as follows:</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 special operator &lt;code&gt;new&lt;/code&gt; can be used to create non-[[Actor]] objects. In its simplest form it works like a prefix operator, but it can also take additional parameters similar to a [[function call]]. The general syntax for using the &lt;code&gt;new&lt;/code&gt; operator is as follows:</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>&#160; '''new''' ['''(''' ''outer'' [''',''' ''name'' [''',''' ''flags'']] ''')'''] ''class'' ['''(''' ''template'' ''')''']</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>&#160; '''new''' ['''(''' <ins class="diffchange diffchange-inline">[</ins>''outer'' [''',''' ''name'' [''',''' ''flags''<ins class="diffchange diffchange-inline">]</ins>]] ''')'''] ''class'' ['''(''' ''template'' ''')''']</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>Arguments:</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>Arguments:</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>; outer : The value for the new object's Outer variable. The default value is &lt;code&gt;None&lt;/code&gt;, which means the object is created within the &quot;transient package&quot;, a virtual package for runtime objects.&lt;br/&gt;If the class to create an object from is declared [[within]] another class, then the ''outer'' argument must be an object of that class or a subclass.</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>; outer : The value for the new object's Outer variable. The default value is &lt;code&gt;None&lt;/code&gt;, which means the object is created within the &quot;transient package&quot;, a virtual package for runtime objects.&lt;br/&gt;If the class to create an object from is declared [[within]] another class, then the ''outer'' argument must be an object of that class or a subclass.</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L113" >Line 113:</td> <td colspan="2" class="diff-lineno">Line 115:</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>O = new(None, 'ExampleObject') class'TestClass'; // O.Name == 'ExampleObject'</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>O = new(None, 'ExampleObject') class'TestClass'; // O.Name == 'ExampleObject'</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>O = new(None, '', RF_Transient) class'TestClass'; // makes O transient even if TestClass isn't</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>O = new(None, '', RF_Transient) class'TestClass'; // makes O transient even if TestClass isn't</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>O = new(None, '', 0) class'TestClass' (TestClass'TemplateObject'); // duplicates <del class="diffchange diffchange-inline">ExmapleObject</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>O = new(None, '', 0) class'TestClass' (TestClass'TemplateObject'); // duplicates <ins class="diffchange diffchange-inline">TemplateObject</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>&lt;/uscript&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>&lt;/uscript&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>The return type of the &lt;code&gt;new&lt;/code&gt; operator corresponds to the metatype of the specified class argument:</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 <ins class="diffchange diffchange-inline">(compile-time) </ins>return type of the &lt;code&gt;new&lt;/code&gt; operator corresponds to the <ins class="diffchange diffchange-inline">(compile-time) </ins>metatype of the specified class argument:</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;</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;</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>local class&lt;WebApplication&gt; WAClass;</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>local class&lt;WebApplication&gt; WAClass;</div></td></tr> </table> Wormbo https://wiki.beyondunreal.com/Operators?diff=42582&oldid=prev Wormbo: /* Operator precedence and associativity */ separated precedence and associativity sections, added more asociativity examples 2010-03-04T19:09:29Z <p>‎<span dir="auto"><span class="autocomment">Operator precedence and associativity: </span> separated precedence and associativity sections, added more asociativity examples</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 19:09, 4 March 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L16" >Line 16:</td> <td colspan="2" class="diff-lineno">Line 16:</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>Operators can be overloaded, that means multiple operators with the same name or symbol can be defined, as long as they differ in their operand types. Overloading with identical operand types is not allowed as the engine would not be able to distinguish between the definitions.</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>Operators can be overloaded, that means multiple operators with the same name or symbol can be defined, as long as they differ in their operand types. Overloading with identical operand types is not allowed as the engine would not be able to distinguish between the definitions.</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>===Operator precedence <del class="diffchange diffchange-inline">and associativity</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>===Operator precedence===</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">To make it short, all regular infix operators of the same precedence are [[wp:Operator associativity|left-associative]] and there's no way to change that. &lt;code&gt;a + b + c + d&lt;/code&gt; is always evaluated as &lt;code&gt;((a + b) + c) + d&lt;/code&gt;. While this doesn't change the general evaluation order of the operands, it may have an impact on the type of operation and the result. For example, consider the following code:</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></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">&lt;uscript&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></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">local vector u, v;</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></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">local float f, g;</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></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>&#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></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">u = v * f * g;</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></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">&lt;/uscript&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></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">This code evaluates as &lt;code&gt;(v * f) * g&lt;/code&gt;, that means both operators are &lt;code&gt;vector * float&lt;/code&gt;. If this was written as &lt;code&gt;v * (f * g)&lt;/code&gt;, the second operator would actually be &lt;code&gt;float * float&lt;/code&gt;. It doesn't matter much for the result in this case, but you will have to keep this effect in mind for int operations where, for example, division or bit shifting.</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></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>&#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></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>Operator precedence controls, how tightly an operator binds its operands. A precedence value can only be specified for infix operators (pre/postfix operators bind as tightly as possible), with lower numbers binding more tightly. For example, &lt;code&gt;*&lt;/code&gt; has a precedence of 16, while &lt;code&gt;+&lt;/code&gt; has 20. That means &lt;code&gt;*&lt;/code&gt; binds more tightly than &lt;code&gt;+&lt;/code&gt;, so &lt;code&gt;a * b + c * d&lt;/code&gt; is evaluated as &lt;code&gt;(a * b) + (c * d)&lt;/code&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>Operator precedence controls, how tightly an operator binds its operands. A precedence value can only be specified for infix operators (pre/postfix operators bind as tightly as possible), with lower numbers binding more tightly. For example, &lt;code&gt;*&lt;/code&gt; has a precedence of 16, while &lt;code&gt;+&lt;/code&gt; has 20. That means &lt;code&gt;*&lt;/code&gt; binds more tightly than &lt;code&gt;+&lt;/code&gt;, so &lt;code&gt;a * b + c * d&lt;/code&gt; is evaluated as &lt;code&gt;(a * b) + (c * d)&lt;/code&gt;.</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="L65" >Line 65:</td> <td colspan="2" class="diff-lineno">Line 56:</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>|}</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>|}</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>Note that string operations, bitwise integer operations and logical AND, OR and XOR bind less tightly than comparison operators. See {{classgames|Object operators}} for detailed descriptions of the operators.</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>Note that string operations, bitwise integer operations and logical AND, OR and XOR bind less tightly than comparison operators. See {{classgames|Object operators}} for detailed descriptions of the operators.</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;">===Operator associativity===</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;">To make it short, all regular infix operators of the same precedence are [[wp:Operator associativity|left-associative]] and there's no way to change that. &lt;code&gt;a + b + c + d&lt;/code&gt; is always evaluated as &lt;code&gt;((a + b) + c) + d&lt;/code&gt;. While this doesn't change the general evaluation order of the operands, it may have an impact on the type of operation and the result. For example, consider the following code:</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;">&lt;uscript&gt;</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;">local vector u, v;</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;">local float f, g;</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;"></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;">u = v * f * g;</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;">&lt;/uscript&gt;</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;">This code evaluates as &lt;code&gt;(v * f) * g&lt;/code&gt;, that means both operators are &lt;code&gt;vector * float&lt;/code&gt;. If this was written as &lt;code&gt;v * (f * g)&lt;/code&gt;, the second operator would actually be &lt;code&gt;float * float&lt;/code&gt;. It doesn't matter much for the result in this case, but you will have to keep this effect in mind for [[int]] operations like division or bit shifting, which are usually not reversible. For example the expression &lt;code&gt;i / n * n&lt;/code&gt; returns the largest multiple of n that is less than or equal to i if both variables are declared of type int.</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;"></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;">You might find the left-associativity counter-intuitive if you want to do something like:</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;">&lt;uscript&gt;</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;">local float a, b, c;</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;"></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;">a *= b *= c;</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;">&lt;/uscript&gt;</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;">This won't compile because it's equal to &lt;code&gt;(a *= b) *= c&lt;/code&gt; and you cannot pass complex expressions into ''out'' parameters. What you really want is &lt;code&gt;a *= (b *= c);&lt;/code&gt;, which requires the parentheses due to left-associativity of all operators.</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;"></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>==Special operators==</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>==Special operators==</div></td></tr> </table> Wormbo https://wiki.beyondunreal.com/Operators?diff=40427&oldid=prev Wormbo: /* New operator */ mentioned Created() and sife effects of recreating an existing object 2010-01-11T10:46:27Z <p>‎<span dir="auto"><span class="autocomment">New operator: </span> mentioned Created() and sife effects of recreating an existing object</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 10:46, 11 January 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L93" >Line 93:</td> <td colspan="2" class="diff-lineno">Line 93:</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>Arguments:</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>Arguments:</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>; outer : The value for the new object's Outer variable. The default value is &lt;code&gt;None&lt;/code&gt;, which means the object is created within the &quot;transient package&quot;, a virtual package for runtime objects.&lt;br/&gt;If the class to create an object from is declared [[within]] another class, then the ''outer'' argument must be an object of that class or a subclass.</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>; outer : The value for the new object's Outer variable. The default value is &lt;code&gt;None&lt;/code&gt;, which means the object is created within the &quot;transient package&quot;, a virtual package for runtime objects.&lt;br/&gt;If the class to create an object from is declared [[within]] another class, then the ''outer'' argument must be an object of that class or a subclass.</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>; name : The name for the new object. In [[Unreal Engine 2]] this must be a [[string]], other engine generations expect a [[name]] here. Leaving the name empty assigns a default name consisting of the class name and a number. Unreal Engine 2 might not append the number unless the engine was started with the commandline parameter &lt;code&gt;-makenames&lt;/code&gt;.</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>; name : The name for the new object. In [[Unreal Engine 2]] this must be a [[string]], other engine generations expect a [[name]] here. Leaving the name empty assigns a default name consisting of the class name and a number. Unreal Engine 2 might not append the number unless the engine was started with the commandline parameter &lt;code&gt;-makenames&lt;/code&gt;<ins class="diffchange diffchange-inline">. Specifying the name of an existing object of the same class within the same outer object may have unexpected results if the existing object is still in use as it will be replaced by the new object</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>; flags : Specifies object flags for the new object. Only use this if you know what you're doing!</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>; flags : Specifies object flags for the new object. Only use this if you know what you're doing!</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>; class : The class to create an object of. The specified class must not be [[abstract]] or extend [[Actor]]. (Actors must be created with the [[Spawn() function]].)</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>; class : The class to create an object of. The specified class must not be [[abstract]] or extend [[Actor]]. (Actors must be created with the [[Spawn() function]].)</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L122" >Line 122:</td> <td colspan="2" class="diff-lineno">Line 122:</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>WA = new OClass;&#160; // type mismatch error (Object doesn't extend WebApplication!)</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>WA = new OClass;&#160; // type mismatch error (Object doesn't extend WebApplication!)</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;</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;</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;">In [[Unreal Engine 2]] the newly created object receives a call to its ''Created()'' function before the &lt;code&gt;new&lt;/code&gt; operator returns.</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;"></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>{{navbox unrealscript}}</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>{{navbox unrealscript}}</div></td></tr> </table> Wormbo https://wiki.beyondunreal.com/Operators?diff=40407&oldid=prev Wormbo: created actual article 2010-01-10T14:50:40Z <p>created actual article</p> <a href="https://wiki.beyondunreal.com/Operators?diff=40407&amp;oldid=40387">Show changes</a> Wormbo https://wiki.beyondunreal.com/Operators?diff=40387&oldid=prev 68.204.56.137: This is a start, taken from the official reference. It just needs formatting and an introduction. 2010-01-05T20:34:05Z <p>This is a start, taken from the official reference. It just needs formatting and an introduction.</p> <p><b>New page</b></p><div>{{expand}}<br /> <br /> $ (dollar sign)<br /> <br /> string $ ( coerce string A, coerce string B )<br /> <br /> Takes two strings and concatenates them.<br /> <br /> Example: log(&quot;Unreal&quot;$&quot;Script&quot;); //prints &quot;UnrealScript&quot;<br /> <br /> $=<br /> <br /> string $= ( out string A, coerce string B )<br /> <br /> Concat two strings and assign it to the first.<br /> <br /> Example: MyString $= &quot;add this&quot;; // does the same as: MyString = MyString$&quot;add this&quot;<br /> <br /> @ (at)<br /> <br /> string @ ( coerce string A, coerce string B )<br /> <br /> Takes two strings and concatenates them with a space in-between.<br /> <br /> Example: log(&quot;a&quot;@&quot;lot&quot;); //prints &quot;a lot&quot;<br /> <br /> @=<br /> <br /> string @= ( out string A, coerce string B )<br /> <br /> Analog to $= this operator will concat and assign (but with a space between the two strings).<br /> <br /> Example: MyString @= &quot;concat and assign with a space&quot;;<br /> <br /> &lt; (less-than)<br /> <br /> bool &lt; ( string A, string B )<br /> <br /> Takes two strings and returns true if the first string is alphabetically before the second string. Note that capital letters are always alphabetically before lower case letters; consider Caps if case does not matter.<br /> <br /> Example: (&quot;Monkey&quot; &lt; &quot;Robot&quot;) //this is TRUE.<br /> <br /> &gt; (greater-than)<br /> <br /> bool &gt; ( string A, string B )<br /> <br /> Takes two strings and returns true if the first string is alphabetically after the second string. Note that capital letters are always alphabetically before lower case letters; consider Caps if case does not matter.<br /> <br /> Example: (&quot;Batman&quot; &gt; &quot;Aquaman&quot;) //this is TRUE.<br /> <br /> &lt;= (less-than-or-equal-to)<br /> <br /> bool &lt;= ( string A, string B )<br /> <br /> Takes two strings and returns true if the first string is alphabetically before or the same as the second string. Note that capital letters are always alphabetically before lower case letters; consider Caps if case does not matter.<br /> <br /> Example:<br /> <br /> (&quot;Monkey&quot; &lt;= &quot;Robot&quot;) //this is TRUE.<br /> (&quot;Monkey&quot; &lt;= &quot;Monkey&quot;) //this is TRUE.<br /> <br /> &gt;= (greater-than-or-equal-to)<br /> <br /> bool &gt;= ( string A, string B )<br /> <br /> Takes two strings and returns true if the first string is alphabetically after or the same as the second string. Note that capital letters are always alphabetically before lower case letters; consider Caps if case does not matter.<br /> <br /> Example:<br /> <br /> (&quot;Monkey&quot; &gt;= &quot;Robot&quot;) //this is FALSE.<br /> (&quot;Monkey&quot; &gt;= &quot;Monkey&quot;) //this is TRUE.<br /> <br /> == (equal-equal)<br /> <br /> bool == ( string A, string B )<br /> <br /> Takes two strings and returns true if the strings are the same. Note that this is a case sensitive compare.<br /> <br /> Example:<br /> <br /> (&quot;Monkey&quot; == &quot;Robot&quot;) //this is FALSE.<br /> (&quot;Monkey&quot; == &quot;Monkey&quot;) //this is TRUE.<br /> (&quot;Monkey&quot; == &quot;monkey&quot;) //this is FALSE.<br /> <br /> = (not-equal)<br /> <br /> bool != ( string A, string B )<br /> <br /> Takes two strings and returns true if the strings are NOT the same. Note that this is a case sensitive compare.<br /> <br /> Example:<br /> <br /> (&quot;Monkey&quot; != &quot;Robot&quot;) //this is TRUE.<br /> (&quot;Monkey&quot; != &quot;Monkey&quot;) //this is FALSE.<br /> (&quot;Monkey&quot; != &quot;monkey&quot;) //this is TRUE.<br /> <br /> ~= (tilde-equal)<br /> <br /> bool ~= ( string A, string B )<br /> <br /> Takes two strings and returns true if the strings are the same regardless of case.<br /> <br /> Example:<br /> <br /> (&quot;Monkey&quot; ~= &quot;Robot&quot;) //this is FALSE.<br /> (&quot;Monkey&quot; ~= &quot;Monkey&quot;) //this is TRUE.<br /> (&quot;Monkey&quot; ~= &quot;monkey&quot;) //this is TRUE.<br /> <br /> -= (minus-equal)<br /> <br /> string -= ( out string A, coerce string B );<br /> <br /> Removes all occurences of B from A and assign the result to A;<br /> <br /> Example:<br /> <br /> MyString = &quot;test: this is a test&quot;;<br /> MyString -= &quot;test&quot;;<br /> log(MyString); // prints: &quot;: this is a &quot;;</div> 68.204.56.137