Dirk Laurie on Tue, 14 Oct 2003 16:52:53 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: write in a file


Markus Endres skryf:
> 
> I know the command 'write' to write the output of a computation (or
> something else) to a file. 
> 
> but this appends the output to the file. Is there any possibility to
> overwrite this file? 
> 
While the topic of files is hot, and since I got no reply
the previous time round:

Can one read in from a Pari-GP-written file one item at a time?
For example, in a loop I use 'write(filename,x)'.  It creates
a lot of lines starting with 'x='.  

If I say 'read(filename)', the whole file is read, and all the
values of x except the last are lost.  I want to read one, do
something to it, read another, etc.

Dirk