Problem with 'reset' package

Help
UnTom
2011-08-24
2012-11-20
  • UnTom

    UnTom - 2011-08-24

    Hi there!
    (Since this appears to be somewhat of a bug, I'm not sure if I should rather post on the developer mailing list or here in the forum. Tell me if I should repost it on the mailing list as well).

    I'm having a few issues with the 'reset' package. First off, it doesn't seem to work when "nat" is set to off:

    1: off int;
    1: load_package reset;
    1: x:=5;

    x := 5
    1: resetreduce;
    1: x;

    5

    Secondly, it would appear that after the first call to "resetreduce", all other calls of the function have no effect:

    2: load_package reset;

    3: x:=5;

    x := 5

    4: x;

    5

    5: resetreduce;
    5: x;

    x
    5: x:=5;

    x := 5
    5: resetreduce;
    5: x;

    5

    Are these truly bugs, or am I missing something?

     
  • Rainer Schöpf

    Rainer Schöpf - 2011-08-24

    The second one is a bug: resetreduce resets the int switch to off, not to on (its default) - which brings us to the first problem.

    The first one is … well … an unfortunate conincidence, and I'm not entirely sure how to handle this. resetreduce works by looking at all previous inputs and undoing their effect. With int set to off, no input history is kept, so nothing can be undone.

    I'll check in a correction to the second problem soon.

      Rainer

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks