"read" question



Hello,

I have the file "Interactive.mac" containing the single block statement.

block( while (foo # "q") do
          (foo: read("Enter a number to continue, \"q\" to quit. "),
               print(" you entered ",foo)
           ),
        print(" Bye!"),
        reset()
      )$

When I load it into maxima (either command line or xmaxima), it
executes as expected.  But, in order to load and execute it again, I
have to completely restart maxima.  Is there a simple way to keep the
same session going and simply re-run the Interactive.mac file?

Here is what happens.

(%i1) load("Interactive");
Enter a number to continue, "q" to quit.
33;
  you entered  33
Enter a number to continue, "q" to quit.
27;
  you entered  27
Enter a number to continue, "q" to quit.
32;
  you entered  32
Enter a number to continue, "q" to quit.
"q";
  you entered  q
  Bye!
(%o1)                          ./Interactive.mac
(%i2) load("Interactive");
  Bye!
(%o1)                          ./Interactive.mac
(%i2) load("Interactive");
  Bye!
(%o1)                          ./Interactive.mac


Any suggestions?

TIA,
  -sen





  ---------------------------------------------------------------------------
  | Sheldon E. Newhouse            |    e-mail: sen1 at math.msu.edu           |
  | Mathematics Department         |       				   |
  | Michigan State University      | telephone: 517-355-9684                |
  | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562                |
  ---------------------------------------------------------------------------