Skip to main content
1 of 4
JRad
  • 63
  • 4

What function superseded SpaceForm?

In older versions of Mathematica you could use SpaceForm to leave a certain amount of spaces when writing to a file. For example, if we have the following data:

data = Table[{x, N[Exp[2 - x]]}, {x, 0, 40, 5}];

We can then write it to a file

MapThread[Write["file.txt", FortranForm[#], SpaceForm[4], FortranForm[#2]]&, Transpose[data]]

You can still use SpaceForm in the current version of Mathematica but it seems there is no documentation for it. I'm just wondering if that function was replaced by a newer one or how to do the same thing with a documented function.

JRad
  • 63
  • 4