[seqfan] Re: Writing files in PARI v. 2.9.3?

M. F. Hasler seqfan at hasler.fr
Sun Jan 7 04:04:17 CET 2018


On Sat, Jan 6, 2018 at 11:33 AM, Ray Chandler <rayjchandler at sbcglobal.net>
wrote:

> The last one is on the right track, but Win10 does

not want you writing to the Program Files folder.


This is true.
Also, a  "\" in a string will be treated as escape character, so you have
to use 2 in a row if you want to get a sting with a backslash:
e.g., # "\\"  yields 1, as the length of this string.  # "\"  yields an
error message for an unterminated string.
But you can use unix style slashes "/" for separating path components.
Personally, I use a working directory "C:\tmp\" which I can refer to as
"/tmp/", as in
write("/tmp/bxxx.txt", n" ",a(n))
or : #a = readstr("/tmp/bxxx.txt")

Besides all of this, MS Window's "preview" feature, which displays file
stats and contents in a left margin / column of the explorer,
may also cause file errors, if PARI wants to write to a file while this
file is selected ("highlighted") in the "explorer".
So you should better first select/highlight a different file in Window's
Explorer,
before issuing write() commands in PARI.

- Maximilian



More information about the SeqFan mailing list