Am 12.12.2020 um 02:30 schrieb Allin Cottrell:
On Fri, 11 Dec 2020, Sven Schreiber wrote:
> BTW, I also observed that the display/printing of the string
within
> gretl in the output window was fine. The phenomenon only occurred when
> saving to a file.
OK, I'll take a look at that.
Here's a slight extension of the previous script, where newtest.txt has
the contents: "no\nsleep\ntill\nBrooklyn", and according to what I see
in the SciTE editor it has CRLF line endings. Counting CRLF as two
characters there are 25 chars in the file (ignoring EOF).
<hansl>
s = readfile("newtest.txt")
eval nelem(s) # gives 25
eval strlen(s) # 25
set verbose off
outfile newtest2.inp
print s
end outfile
s2 = readfile("newtest2.inp")
eval nelem(s2) # 30
eval strlen(s2) # 30
</hansl>
The file got 5 new characters, and closer inspection shows this content:
noCRCRLFsleepCRCRLFtillCRCRLFBrooklynCRLF
This time there's no email involved, just gretl I think!
on snapshot Dec 9th
cheers
sven