Re: C f-format-like output in Mma
- To: mathgroup at smc.vnet.net
- Subject: [mg7710] Re: [mg7683] C f-format-like output in Mma
- From: seanross at worldnet.att.net
- Date: Wed, 2 Jul 1997 14:21:30 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Andreas Siemer wrote: > > Hi folks, > > does anyone know whether there is a simple way to format output > of real numbers in Mma with fixed space and a fixed number of digits > following the decimal point in a way similar to the C or FORTRAN > f-format? > > Thanks for any suggestions! > > -- > > --------------------------------------------------------------------------- > From: Dr. Andreas Siemer To: mathgroup at smc.vnet.net > To: mathgroup at smc.vnet.net > Alfred-Wegener-Institut fuer Polar- und Meeresforschung > Sektion Physik I > Am Handelhafen 12 > D-27570 Bremerhaven, Germany > > Tel.: +49-471-4831-524 > FAX: +49-471-4831-425 ( indicate recipient: Siemer/Physik I > ) > email: asiemer at AWI-Bremerhaven.de > --------------------------------------------------------------------------- I don't have the file I wrote to do just that in front of me, but, in answer to your question, no, there is no simple way, if by simple you mean a single command. The way I did it was to use ToString on FortranForm of an expression and write the strings to file.