text output



On Thu, Jan 28, 2010 at 11:10 AM, Adam Majewski <adammaj1 at o2.pl> wrote:

> I have a list of integers :
> a: [1,0,0]
>
> I want to save it as a list of integer ( one in a line) ?in a text file :
>
> 1
> 0
> 0

How about this:

S : openw ("tmp.txt");
for x in a do printf (S, "~a~%", x);
close (S);

HTH

Robert Dodier