Discussion:
WriteLn gives io error 105
(too old to reply)
Les
2011-05-16 05:16:27 UTC
Permalink
suddenly every time I use Writln function I get " io error 105"

AssignFile(f, 'Id.Txt');
Reset(f);
WriteLn(f, 'Testing');
CloseFile(f);

Is this a result of Windows XP setting ? Is it fixable ?
Les
Maarten Wiltink
2011-05-16 07:22:30 UTC
Permalink
Post by Les
suddenly every time I use Writln function I get " io error 105"
AssignFile(f, 'Id.Txt');
Reset(f);
WriteLn(f, 'Testing');
CloseFile(f);
That appears to be 'file not open for output', as indicated by a
quick google for 'pascal error 105'. It does reduce the credibility
of the 'suddenly' bit somewhat.

Type 'rewrite', press F1, read help.

Groetjes,
Maarten Wiltink
Marco van de Voort
2011-05-16 07:44:49 UTC
Permalink
Post by Les
suddenly every time I use Writln function I get " io error 105"
AssignFile(f, 'Id.Txt');
Reset(f);
WriteLn(f, 'Testing');
CloseFile(f);
Is this a result of Windows XP setting ? Is it fixable ?
In addition to what Maarten said, did you happen to change the file type
from e.g. "file" to "text" or "textfile" ?

reset opens readwrite for the "file" type, but is readonly for "text".
Les
2011-05-16 08:57:29 UTC
Permalink
suddenly every time I use  Writln function I get " io error 105"
                  AssignFile(f, 'Id.Txt');
                  Reset(f);
                 WriteLn(f, 'Testing');
                 CloseFile(f);
Is this a result of Windows XP setting ? Is it fixable ?
Les
Rewrite worked, Thank You very much.
The "suddenly" because of having used the function repeatedly for
years ,
(declaring f : TextFile;) without problems. Never mind, sorted now
with your help.
Les

Loading...