Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: [mg5305] Formatting Output
Posted:
Nov 26, 1996 3:41 AM


At 06:44 AM 11/23/96 +0000, you wrote: > >I want a combination of string and expression written to a file. >The output from a Print command is exactly what I want: > > In[43]:= Print["gm(",12,",",12,")=",FortranForm[gm]]; > gm(12,12)=Cos(theta) > >Does anyone know how to get that same output written to a file? > Susan,
Here is what I did in 2.2.3 and 3.0. I hope it helps. If the approach is wrong, let me know and I will think about it some more.
a=ToString["gm(12,12)=Cos(theta)"] Command to Mma gm(12,12)=Cos(theta) Response from mma a>>novfile write to file novfile <<novfile input from file novfile gm(12,12)=Cos(theta) check!!!
Sherman Reed



