> LChar := 'X';
> if Read(PChar(LChar)^, 1) = 0 then begin
Try
if Read(LChar[1],1)=0 then begin
Since I think it's wanting a buffer location not the character at that
location which is I think
what is getting passed in with PChar(LChar)^
> In some cases, depending on what other code I've got in unrelated
> places, I get 0 returned - ie., the TFileStream thinks that it can't
> read from the file or that the file is empty, which obviously should
> never be the case. Things are complicated by the fact that the error
> rarely happens, and when it does putting in a ShowMessage or a
> breakpoint cause it to _not_ happen!
Because the passed in address possibly is zero... Does the debugger change
the way local variables are initialised (IE blanking memory to nil)...
--
Aaron@home
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz