MUG: save in Maple 7   (29.10.01)

Maple User Group Answers


[Anfang] [Hauptseite] [Suchen] [LDFM]


save in Maple 7   (29.10.01)


[down] [index] Neville Neill

Can anyone help with what seems a trivial problem ? We have recently upgraded from Maple 5 to Maple 7. A simple procedure like

n:=proc(a)
local b;
b:=a*a;
end;

is saved in Maple 5 by the command save `n.m`; but this gives an error message in Release 7 (Error, must specify names to save). What am I doing wrong ?

[down] [up] Carl DeVore   (30.10.01)

Change that to

> save n, `n.m`;

In your earlier experience with the command, you were not just saving the procedure n. You were saving all the variables that were assigned in that session. Now, you only save the variables that you explicitly want to save.

[down] [up] Koch-Beuttenmueller   (31.10.01)

save n, "n.m";

will do the job.

[up] Stanley J Houghton   (31.10.01)

You have to specify the list of names to be saved in Release 7. Thus

save n,"n.m";

in your case saves the procedure `n`.

The only way I can find of saving all your names in the session so far appears to be to construct the save statement and use parse, since save doesn't evaluate 'anames()' to a sequence of names (in 'save anames(),"n.m;'). Instead it tries to evaluate anames() to a name and fails.

Thus you could use

parse(cat("save ",
   substring(convert([anames(),"n.m"],string),2..-2)),
   statement);

or something similar to construct the filename too. Maybe others have a more elegant solution.


[Anfang] [Hauptseite] [Suchen] [LDFM]


Dr. U. Klein
Tel: +49-241-8094536
Email: U.Klein@Math.RWTH-Aachen.DE