With this style of interaction, perhaps a worksheet system like wxMaxima
would work better for you. You would just delete (or replace) the failing
steps.
You could also simply kill(%i23) for bad steps.
You might be able to automate the process if you have a standard convention
for errors (e.g. return value is ERROR). Then you could write a simple
function that only stringout's non-ERROR cases.
But I'd think it's not just errors you want to delete, but also dead ends
-- you tried one approach, it didn't work, and you replaced it by another.
-s
On Sun, Apr 21, 2013 at 11:48 AM, Sheldon Newhouse <sen1 at math.msu.edu>wrote:
> Hello,
> I am looking for suggestions for error control in various maxima programs.
> As it stands now, most of my programs require the user to make sure that
> assumptions are valid in running routines. If they fail, then the routines
> of course give errors.
> Suppose I run such a routine which produces an error in a session and
> then I save the input with stringout("my_file.mac",input).
>
> In order to reload the file "my_file.mac" I have to edit it and remove
> the routine which caused the error or the command
> load(my_file)
> will fail.
>
> In a typical session in which errors are introduced they are subsequently
> fixed and one continues.
> But, later saving and reloading with "stringout" does not remove the
> earlier bad routines (unless one looks back and avoids the offending
> command numbers, etc.). The latter is cumbersome to say the least after
> many screens have scrolled up.
>
> Some time ago I started putting in error control subroutines in each
> function so that the errors would not impede reloading after the stringout
> save commands. This is also quite cumbersome, so I am back to the re-edit
> before reload procedure.
>
> Is there some setting or command which can automatically be loaded at the
> beginning of a session so that repeated use of saving and loading sessions
> will work even if errors are introduced as a file is being loaded?
>
> 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
> |
>
> -------------------------------------------------------------------------------------------
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>