MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Saving

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21768] Re: [mg21740] Saving
  • From: Bojan Bistrovic <bojanb at physics.odu.edu>
  • Date: Thu, 27 Jan 2000 22:56:49 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

> hello!
> how can i create a file name in a variable in a program to save results?
> 
> For example,
> 
> result=1
> filename= SequenceForm["test", i, ".asc"] /. {i -> 1}
> Put[result, filename]
> 
> gives the output:
> 
> General::stream: test1.asc is not a string, InputStream[ ], or
> OutputStream[ ].
> 
You should use
filename= StringJoin["test",ToString[ i/.{i -> 1} ], ".asc"]
Put[result, filename]

or 

filname=Hold[StringJoin["test",ToString[i], ".asc"] ]/.i->1 //ReleaseHold
Put[result, filename]


> by the way, is there a way to save (all) variables with name and current
> content?
> 
Save["filename","context`"] or Save["filename","nameform"]  will do it

Bye, Bojan

-------------------------------------------------------------
Bojan Bistrovic,                       bojanb at physics.odu.edu  
Old Dominion University, Physics Department,      Norfolk, VA
-------------------------------------------------------------



  • Prev by Date: Re: Saving
  • Next by Date: Re: Bessel J0 zeros
  • Previous by thread: Re: Saving
  • Next by thread: Re: Saving