On 25 Jul 2011, at 15:07, Martin wrote:

> If some packages are compiled with and some without IO checking. An IO error 
> happens in a package that is compiled without IO checking, as expected no 
> error is risen here. But the error is stored, and an unrelated statement 
> which has IO checks will fail later.
> 
> The following demo project enables and disables IO checks to simulate the 
> situation.
> 
> program Project1;
> {$mode objfpc}{$H+}
> begin
>  {$I+}
>  writeln('1');
>  {$I-}
>  chdir('c:\IDoNotExist');
>  {$I+}
>  writeln('2');  // error for chdir is risen here
>  readln;
> end.

That is normal. If you disable iochecks, you're supposed to call ioresult to 
check for errors (which will in turn reset any stored error conditions).


Jonas_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to