Question: writing data during iteration

I am writing a big numerical code in maple. I need to write the results in each step in a file. I mean in the first step of loop it writes the results in the first line of a text file, in the second step writes in the second line and to the end. when I use writedata command, it needs to write a complete array or matrix and it is not what i need. In  other words I want to save data for each steps of iteration during the calculation and when it goes to ther next step it writes the result in the next line.

Can you help me to perform it?

Thanks

Please Wait...