MathGroup Archive 2001

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

Search the Archive

Re: How can export {1,5,9} into a TXT file as the format as 1 5 9?


Hi,

Put[] ist to save complete Mathematica expressions.
But:


myWriteAppend[fname_String, lst_List] :=
  Module[{f},
    f = OpenAppend[fname, FormatType -> StandardForm];
    Write[f, Infix[lst, " "]];
    Close[f];
    ]


and

In[]:=myWriteAppend["data.txt", {1, 2, 3}];
      myWriteAppend["data.txt", {4, 5, 6}];


In[]:=!!data.txt

1 2 3
4 5 6


will work.

Regards
  Jens

liwen liwen wrote:
> 
> Hi;
> 
> I encounter such problem during exporting data to TXT
> file.
> I want to export pt={1,5,9} to a TXT file.
> I use pt>>>data.txt to do it, but the result is
> "{1,5,9}", not the format as "1  5  9" that I
> expected.
> How can I achieve it?
> 
> Thank you very much.
> 
> Liwen
> 
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com


  • Prev by Date: Zero does not Equal Zero
  • Next by Date: Re: Solve bug !!
  • Previous by thread: Re: How can export {1,5,9} into a TXT file as the format as 1 59?
  • Next by thread: Limit and Abs