<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <br>
    Hi, <br>
    <br>
    I never red the book of Robots, but I see a lot of people name it. <br>
    <br>
    Anyhow, here is a simple script that loops over integers and stops<br>
    when it reaches the arbitrary number "1567". It stops by opening <br>
    a debugger. <br>
    <br>
    In the debugger look for <font color="#de3438">UndefinedObject>>doIt</font>
    to see your code. <br>
    <br>
    This script is an example of bad code. Indeed it will lock your
    interface until it finishes its jobs. And, if you look in the
    Transcript window you will see the counting is going on very very
    slowly. <br>
    <br>
    But, being so bed is instructive, because you can try to call the
    debugger with Alt+. (try also Ctrl+. or Cmd+. it depends on the  OS)
    in cases like this, when the interface gets stuck. Many times you
    are going to save your session ;) <br>
    <br>
    <font color="#000099"><tt>|i|</tt><tt><br>
      </tt><tt>i := 0.</tt><tt><br>
      </tt><tt>[true] whileTrue: [</tt><tt><br>
      </tt><tt>    i := i + 1.</tt><tt><br>
      </tt><tt>    (i = 1567) ifTrue: [self halt]. </tt><tt><br>
      </tt><tt>    Transcript ensureCr; show: ('number: {1}' format:
        {i.}).</tt><tt><br>
      </tt><tt>    ].</tt><tt><br>
      </tt><br>
    </font><br>
    bye<br>
    Nicola<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 2/4/20 10:16 AM, Robert Kuropkat
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:web-411204@2rosenthals.com">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <div id="_htmlarea_default_style_" style="font:10pt
        arial,helvetica,sans-serif">All,
        <div align="left"><br>
        </div>
        <div align="left">I am working my way
          through the Squeak: Learn Programming with Robots and I hit
          some unexpected behavior with the halt method in Chapter 15. 
          I am not at that
          computer at the moment so cannot say exactly which 3.x version
          of the VM I am using.  It is using the Ready.image and the
          V3.sources
          files.</div>
        <div align="left"><br>
        </div>
        <div align="left">According to the book, the halt method should
          cause execution to stop and invoke the
          debugger.  It does in fact invoke the debugger, however, it
          also skips past and keeps executing.  Is there by chance some
          setting somewhere
          telling the program to skip that method and keep executing?</div>
        <div align="left"><br>
        </div>
        <div align="left">I can follow-up later tonight with
          better details, but thought I'd through the question out in
          case there was in fact an easy answer...</div>
        <div align="left"><br>
        </div>
        <div align="left">Robert Kuropkat</div>
        <div align="left"><br>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Beginners mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>