Board index » delphi » Porting from D5 to D6 i/o problems

Porting from D5 to D6 i/o problems

Hi!

After porting one of my projects from Delphi 5 to Delphi 6, I get many i/o
error 183. I get around this by using {$I-} and {$I+}.

Is there a setting in Delphi that automaticly sets these compiler
directives?
Why did not Delphi 5 return this error?

Best regards,
Geir Bratlie

 

Re:Porting from D5 to D6 i/o problems


I/O error 183 = ERROR_ALREADY_EXISTS

Why not use:

AssignFile(F, FileName);
if FileExists(FileName) then
  Append(F)
else
  Rewrite(F);

or

AssignFile(F, FileName);
try
  Append(F);
except
  Rewrite(F);
end;

Quote
"Geir Bratlie" <geir@(nospamming)royal.no> wrote in message

news:6noB7.977$2H3.16139@news1.oke.nextra.no...
Quote
> Hi!

> After porting one of my projects from Delphi 5 to Delphi 6, I get many i/o
> error 183. I get around this by using {$I-} and {$I+}.

> Is there a setting in Delphi that automaticly sets these compiler
> directives?
> Why did not Delphi 5 return this error?

> Best regards,
> Geir Bratlie

Re:Porting from D5 to D6 i/o problems


Hi!

I get the error when doing Reset too.

-geir-

Other Threads