https://wiki.beyondunreal.com/w/index.php?action=history&feed=atom Do...Until loop - Revision history 2017-11-18T03:04:58Z Revision history for this page on the wiki MediaWiki 1.25.1 https://wiki.beyondunreal.com/Do...Until_loop?diff=43913&oldid=prev Wormbo: typo 2010-08-25T20:53:48Z <p>typo</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 20:53, 25 August 2010</td> </tr><tr><td colspan="2" class="diff-lineno" id="L13" >Line 13:</td> <td colspan="2" class="diff-lineno">Line 13:</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>In [[Unreal Engine 1]] and [[Unreal Engine 2|2]] the compiler wasn't too strict when checking the '''until''' statement. You could omit it, essentially creating an infinite loop that had to be exited with the '''break''' or [[return]] statement. This &quot;feature&quot; was removed in [[Unreal Engine 3]].</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>In [[Unreal Engine 1]] and [[Unreal Engine 2|2]] the compiler wasn't too strict when checking the '''until''' statement. You could omit it, essentially creating an infinite loop that had to be exited with the '''break''' or [[return]] statement. This &quot;feature&quot; was removed in [[Unreal Engine 3]].</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>A variation of the '''do...until''' loop is <del class="diffchange diffchange-inline">avaiable </del>in all engine generations. Like with the other loop constructs, you can specify a single statement instead of the code block after the keyword '''do''':</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>A variation of the '''do...until''' loop is <ins class="diffchange diffchange-inline">available </ins>in all engine generations. Like with the other loop constructs, you can specify a single statement instead of the code block after the keyword '''do''':</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; '''do'''</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; '''do'''</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; ''statement''''';'''</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; ''statement''''';'''</div></td></tr> </table> Wormbo https://wiki.beyondunreal.com/Do...Until_loop?diff=33121&oldid=prev Wormbo: New page: The '''do...until''' loop is a loop construct similar to the while loop, but runs at least once. ==Syntax== The syntax of the '''do...until''' loop is exactly what you would expect fr... 2008-10-11T12:54:35Z <p>New page: The &#039;&#039;&#039;do...until&#039;&#039;&#039; loop is a loop construct similar to the <a href="/While_loop" title="While loop">while loop</a>, but runs at least once. ==Syntax== The syntax of the &#039;&#039;&#039;do...until&#039;&#039;&#039; loop is exactly what you would expect fr...</p> <p><b>New page</b></p><div>The '''do...until''' loop is a loop construct similar to the [[while loop]], but runs at least once.<br /> <br /> ==Syntax==<br /> The syntax of the '''do...until''' loop is exactly what you would expect from its name:<br /> '''do {'''<br /> ...<br /> '''} until ('''''condition''''');'''<br /> Note that UnrealScript doesn't &quot;do...''while''&quot;, that means it loops until the condition is ''True''. (or while it is ''False'')<br /> <br /> Like in any other loop construct you can use [[break]] and [[continue]] to exit the loop or jump to the next iteration.<br /> <br /> ==Quirks==<br /> In [[Unreal Engine 1]] and [[Unreal Engine 2|2]] the compiler wasn't too strict when checking the '''until''' statement. You could omit it, essentially creating an infinite loop that had to be exited with the '''break''' or [[return]] statement. This &quot;feature&quot; was removed in [[Unreal Engine 3]].<br /> <br /> A variation of the '''do...until''' loop is avaiable in all engine generations. Like with the other loop constructs, you can specify a single statement instead of the code block after the keyword '''do''':<br /> '''do'''<br /> ''statement''''';'''<br /> '''until ('''''condition''''');'''<br /> Note that the statement needs to be terminated with a semicolon, similar to the non-block version of the [[If statement]] that requires a semicolon after its statement even if an '''else''' statement follows. It is strongly recommended to enclose even a single statement in curly braces to prevent potential misunderstandings and oversights.<br /> <br /> {{navbox unrealscript}}</div> Wormbo