windows - Freepascal finding eof after reset of a non-empty file -


got me stumped: on windows, free pascal

    {... writes text lines pdftmp, ...}     close(pdftmp);     reset(pdftmp);     while not eof(pdftmp) begin         readln(pdftmp,inpline);         writeln(prodfile,inpline);     end;     close(pdftmp); 

i've verified pdftmp file written text, eof() function returns true on first call, while block never executed.

i tried kinds of tricks surrounding code determine whatever else might causing failure, including updating fpc compiler, no avail. tests confirm improper eof() function result.

the same code works on mac. (freepascal supports various platforms.)

any other poor soul out there had evil befall , stall out nice project? if so, how fixed, if was?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -