<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I think you are running into the issue described here:<br>
    <a class="moz-txt-link-freetext" href="http://docs.racket-lang.org/guide/module-set.html">http://docs.racket-lang.org/guide/module-set.html</a><br>
    <br>
    "Along the same lines, when a module contains no <span
      class="RktSym"><a
href="http://docs.racket-lang.org/reference/set_.html#%28form._%28%28quote._%7E23%7E25kernel%29._set%21%29%29"
        class="RktStxLink" pltdoc="x">set!</a></span> of a
    particular identifier that is defined within the module, then the
    identifier is considered a <span style="font-style: italic">constant</span>
    that cannot be
    changed&#8212;<wbr>not even by re-declaring the module."<br>
    <br>
    Try in your definitions window:<br>
    #lang racket<br>
    (define counter 0)<br>
    (set! counter 0)<br>
    <br>
    <br>
    Thanks,<br>
    Dave<br>
    <br>
    On 10/31/2011 09:58 AM, <a class="moz-txt-link-abbreviated" href="mailto:jkaczorek@aol.pl">jkaczorek@aol.pl</a> wrote:
    <blockquote
      cite="mid:8CE660583067BA6-E18-78A4E@Webmail-d112.sysops.aol.com"
      type="cite"><font color="black" face="arial" size="2"><font
          color="black" face="arial" size="2"><font face="Arial,
            Helvetica, sans-serif">Hi,<br>
            <br>
            I&#8217;m using DrRacket. <br>
            In an edit window I have written:<br>
            <br>
            #lang racket<br>
            (define counter 0)<br>
            <br>
            I&#8217;m pressing &#8220;Run&#8221; button and next, in a command line, after
            running a command:<br>
            <br>
            (set! counter (add1 counter))<br>
            <br>
            I receive a message &#8220;set!: cannot modify a constant:
            counter&#8221;<br>
            <br>
            The problem can be resolved by changing the language
            (Language/Choose language/R5RS and unchecking &#8220;Disallow
            redefinition of initial binding&#8221;) but I suppose that in this
            way I can lose an access to the racket libraries.<br>
            Of course, I realize, that redefinition of the variables is
            not good (functional) programming style but sometimes it&#8217;s
            necessary. Is there a possibility of such modifications
            without changing language?<br>
            <br>
            Jerzy<br>
          </font><br>
        </font></font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________
  For list-related administrative tasks:
  <a class="moz-txt-link-freetext" href="http://lists.racket-lang.org/listinfo/users">http://lists.racket-lang.org/listinfo/users</a></pre>
    </blockquote>
  </body>
</html>