Thanks for the hint. I've experienced the same with Blockrad under
Windows NT. Seems to be a bug under NT or something...
No. It's a bug in your program.
Reading beyond end of file gives a TP RTE 100 (if you are not using
{$I-}) on any operating system - with 2 exceptions:
1) You are using the file type TEXT. In this case string variables
return the empty string, char variables return $1A (^Z) and numeric
variables return 0. One of the reasons for this is that the character
$1A is treated as an artificial EOF marker and you can read it away
(in spite of EOF) by read(f,charvar).
2) You are using the type FILE (untyped) _and_ you are providing the
fourth parameter of type word to blockread which indicates the number
of blocks actually read.
A simple
blockread(f,buff,count);
will crash after eof. But
blockread(f,buff,count,result);
will not crash after eof because you took the responsability to check
after reading if count=result.
Regards
Horst
BlockRead(File,Buffer,MaxiumSize,Dummy);
where Dummy is a Word variable. Under DOS and Win9x, it's ok, but under
NT, is causes Runtime error #216 (GPF). Strange...
OK. GPF is not RTE #100. So it appears that it's not Borland's fault.
Is it a RM program or a DPMI program ?
Are you sure that the GPF only occurs _after_ eof(f) is true ?
Are you sure that you did reset the file using 'reset(f,1)' ?
Are you sure that the buffer is big enough ?
Regards
Horst