Working with files and strings



I suggest you do something like this:

count:0;



while  still_need_more-values do
(
compute....
filename: concat (save,count),
save(filename, variable1, variable2 ...),
count:count+1)

You will have "save0"   "save1"   etc.  files.

These can be loaded back in to maxima.

I think there should also be a way of saving text files
using  writefile(filename)
but it doesn't seem to work the way I expected, and makes blank
files.
RJF


Francisco Coelho wrote:

> Hi maxima users,
> 
> I'm using maxima to do long-time computations and it would be (very) nice 
> if I could save some variables in runtime.
> 
> However, I don't know how to pass a string to a function, so my temporary 
> save-files have all the same name. How can I handle this?
> 
> I whould like to have a function like this:
> 
> mySave( aName, anObject ):= with_stdout( aName, print(anObject) )$
> 
> TIA,
>