<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>0 to: 99 by: 1 do: [ :each | each = 50 ifTrue: [ ^self ] ]<div><br></div><div><br></div><div class="ydp40aa6f74signature">----------------- <br>BenoĆ®t St-Jean <br>Yahoo! Messenger: bstjean
<br>Pinterest: benoitstjean
<br>Instagram: Chef_Benito<br>IRC: lamneth
<br>Blogue: endormitoire.wordpress.com
<br>"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)</div></div>
<div><br></div><div><br></div>

<div id="ydp19de93ffyahoo_quoted_1795386323" class="ydp19de93ffyahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">

<div>
On Friday, November 17, 2017, 1:00:34 AM EST, RedTigerFish <chihuyu@gmail.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">*1 to: 130 do: [:i| ] *  or  *100 timesRepeat: [ ] *<br clear="none"><br clear="none">Maybe because I learned some C before. I thought the above two are loops.<br clear="none"><br clear="none"><br clear="none">The following is "break" example in C. How to implement that in Smalltalk? <br clear="none"><br clear="none">#include <stdio.h><br clear="none">void main() <br clear="none">{   <br clear="none">     for (int i = 0; i < 100; i++) <br clear="none">         if (i == 50) <div class="ydp19de93ffyqt6189126270" id="ydp19de93ffyqtfd12717"><br clear="none">              break; <br clear="none">}<br clear="none"><br clear="none"><br clear="none"><br clear="none">-----<br clear="none">Dig, dig where you are,<br clear="none">Down below's well.<br clear="none">Let those that walk in darkness shout, <br clear="none">Down below's hell.<br clear="none">--<br clear="none">Sent from: <a shape="rect" href="http://forum.world.st/Squeak-Beginners-f107673.html" rel="nofollow" target="_blank">http://forum.world.st/Squeak-Beginners-f107673.html</a><br clear="none">_______________________________________________<br clear="none">Beginners mailing list<br clear="none"><a shape="rect" href="mailto:Beginners@lists.squeakfoundation.org" rel="nofollow" target="_blank">Beginners@lists.squeakfoundation.org</a><br clear="none"><a shape="rect" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="nofollow" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br clear="none"></div></div></div>
</div>
</div></div></body></html>