<div>It's not a question of how to avoid an infinite loop, the question is what to do if you end up with an unintended one. Supposedly, with a mac Cmd- should interrupt execution, but it doesn't seem to work. <br></div><div><br></div><div><a href="http://wiki.squeak.org/squeak/899">http://wiki.squeak.org/squeak/899</a><br></div><div class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><div><br></div></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote class="protonmail_quote" type="cite"><div>-------- Original Message --------<br></div><div>Subject: Re: [Newbies] Infinite loops<br></div><div>Local Time: December 7, 2017 6:34 PM<br></div><div>UTC Time: December 8, 2017 2:34 AM<br></div><div>From: limitcase@gmail.com<br></div><div>To: obrienj <obrienj@protonmail.com>, A friendly place to get answers to even the most basic questions about Squeak. <beginners@lists.squeakfoundation.org><br></div><div><br></div><div dir="ltr"><div>Change your test condition to limit your infinite loop.<br></div><div><br></div><div>x := 0. [x <= 4] whileTrue: [x := x +1. Transcript show: 'infinite loop ', x; cr].<br></div><div><br></div><div><div><br></div><div>infinite loop 1<br></div><div>infinite loop 2<br></div><div>infinite loop 3<br></div><div>infinite loop 4<br></div><div>infinite loop 5<br></div></div><div><br></div><div>Even in a language that supports a "break" command the user must specify the condition for the break in his code.<br></div><div><br></div><div><br></div></div><div class="gmail_extra"><div><br></div><div class="gmail_quote"><div>On Thu, Dec 7, 2017 at 11:59 AM, obrienj <span dir="ltr"><<a href="mailto:obrienj@protonmail.com">obrienj@protonmail.com</a>></span> wrote:<br></div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" class="gmail_quote"><div>I’m using a MacBook Pro and can’t find a way to escape an infinite loop such as this:<br></div><div><br></div><div>x := 0.
[x >= 0] whileTrue: [x := x +1. Transcript show: 'infinite loop ', x; cr]<br></div><div><br></div><div>The the interrupt key (Alt- or Cmd-) does not work, instead I have to force quite Squeak.  Is there a reliable to way to escape an endless loop?<br></div><div><br></div><div><br></div><div class="m_7397940804244957600protonmail_signature_block m_7397940804244957600protonmail_signature_block-empty"><div class="m_7397940804244957600protonmail_signature_block-user m_7397940804244957600protonmail_signature_block-empty"><div><br></div></div><div class="m_7397940804244957600protonmail_signature_block-proton m_7397940804244957600protonmail_signature_block-empty"><br></div></div><div><br></div><div><br></div><div>______________________________<wbr>_________________<br></div><div> Beginners mailing list<br></div><div> <a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.<wbr>squeakfoundation.org</a><br></div><div> <a rel="noreferrer" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.<wbr>org/mailman/listinfo/beginners</a><br></div><div> <br></div></blockquote></div></div></blockquote><div><br></div>