|
[Date Index]
[Thread Index]
[Author Index]
Re: bug in Splice?
- To: MATHGROUP at yoda.physics.unc.edu
- Subject: Re: bug in Splice?
- From: Amaury FonsecaJunior <amaury at rel.mit.edu>
- Date: Fri, 3 Apr 92 17:04:52 -0500
Riccardo asked the following question:
------------------------------------------------------
Dear Mathgroupers, I have a program called GIUH which acting on a matrix of
data produces a a big formula (something like ten lines) which I want to
"splice" in a Fortran program. With my disappointment the whole formula is
written ia a single line, while fortran needs it formatted as 7 blank spaces
and no more than 80 characters for line. I have used:
Splice["infile.mf",PageWidth->72]
for obtaining something useful but the result does not change.
I tried to change the dafault global parameters but witout results.
Any suggestion?
Riccardo Rigon
Dipartimento di Ingegneria Civile e Ambientale
Universita' di Trento -Italy
rigon at iveuncc.unive.it
-----------------------------------------------------
I prefer to use a plain writing format as follows:
file = OpenWrite[ "fortran.out", FormatType -> FortranForm, PageWidth -> 72];
WriteString[file,"* \n" ]; (* this creates a comment line*)
WriteString[file,StringForm[" expression = "] ]; (* this writes the header of the expression*)
Write[file, expression[[1]] ]; (* this writes the expression *)
WriteString[file,"* \n" ];
If you need a matrix you can put the Write ..WriteString in a do loop
amaury
Prev by Date:
elegance vs. 'quick and dirty'
Next by Date:
Re: Flattening
Previous by thread:
elegance vs. 'quick and dirty'
Next by thread:
Re: Flattening
|