# writing data in defined format into file

I have a code that writes datas into file using PutAppend[]. A simple form of the code is written below,

SetDirectory[
CreateDirectory["/home/Desktop/results"]];
outfile = "data1.txt"
Put[outfile];
Do[
prob=f[i],
PutAppend[prob,outfile],{i, 1, 100000}];


Now the problem is that the numbers in output file has form like 2.1337598830647752*^-6. I need to do some other calculation using the output data in mathematica again. I know one can use "CSV" for exporting data, but is there a way to control the format inside PutAppend in a way that it can simply exported into mathematica for other calculation? I belive that the * and ^ will introduce problem into calculations.

• Why do you think there will be a problem? That's a valid shorthand for 2.1337598830647752*10^-6 – ciao May 6 '15 at 23:14
• Hi' I started to do calculation and it does not do it correctly,so for example it prints the result as, 2.1337598830647752*^-6*Log[ 2.1337598830647752*^-6] instead of giving a final result, but when I remove the ^ and * it works perfectly... – setareh May 7 '15 at 20:46
• It sounds like it is reading it back in as a string. Have you looked at DumpSave and the .mx file format. That will keep the data binary instead of converting it to text. – Edmund May 12 '15 at 21:36

well, I found a another solution,instead of changing the writing format, one need to convert the datas using ToExpression[data1.txt]....