MathGroup Archive 2008

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

Search the Archive

Re: FormatType problems


you could e.g. use $PrePrint:


where we assumed you want to print at most 6 digits with 2 digits after 

the decimal points. You should only use this just before you print and 

then reset $Preprint like:


otherwise you will see a lot of strange behaviour.

hope this helps, Daniel

alexxx.magni at wrote:

> Hi guys,

> I have to output data to be read by other mathematica-agnostic

> programs - so I wanted to avoid exponential/scientific notation if

> possible.


> I wrote:

> nf[x_] := NumberForm[N[x], Infinity, ExponentFunction -> (Null &)]


> to convert my data, but I wanted to know if I could even avoid to

> write everywhere:

> Write[f,nf[a],nf[b],...]


> and just let Math know that it has to use nf[] as a wrapper.

> Unfortunately,

> f = OpenWrite["test.dat",  FormatType -> nf]


> doesnt work:

> FormatType::ftype: Value of option FormatType -> nf is not valid.


> $printForms reports:

> {InputForm, OutputForm, TextForm, CForm, FortranForm, MathMLForm, \

> TeXForm, StandardForm, TraditionalForm}


> any hint?


> Alessandro Magni



  • Prev by Date: RealOnly
  • Next by Date: Re: variance (mg86506)
  • Previous by thread: FormatType problems
  • Next by thread: [ANN] Mathematica User Group on LinkedIn