Board index » delphi » If Exist(filename) alway returns true on new faster computer

If Exist(filename) alway returns true on new faster computer

Function Exist(fname:string):Boolean;
Var Ok:boolean;
       f: file;
begin
    Ok :=false;
    Assign(f,fname)
   {$I-} reset(f) {$I+}
    Ok:=(Ioresult=0);
    If OK then Close(f);
    Exist:=Ok;
end;

Borland pascal 7 with tppatch.exe applied.

Windows 98 SE
This function worked for the last 14 years from tp3 through bp7 on processors up to 2200mhz.

This function always returns true.  It functions correctly on a different, slower machine whether it is compiled
on the faster or slower machine.  I tried slowing the cpu down to 1600mhz with no change in results.

Any ideas?

Thanks

 

Re:If Exist(filename) alway returns true on new faster computer


Function Exist(fname:string):Boolean;
Var Ok:boolean;
       f: file;
begin
    Ok :=false;
    Assign(f,fname)
   {$I-} reset(f) {$I+}
    Ok:=(Ioresult=0);
    If OK then Close(f);
    Exist:=Ok;
end;

Borland pascal 7 with tppatch.exe applied.

Windows 98 SE
This function worked for the last 14 years from tp3 through bp7 on processors up to 2200mhz.

This function always returns true.  It functions correctly on a different, slower machine whether it is compiled
on the faster or slower machine.  I tried slowing the cpu down to 1600mhz with no change in results.

Any ideas?

Thanks

Re:If Exist(filename) alway returns true on new faster computer


Quote
In article <yG09a.117858$oj6.847...@news.easynews.com>, <no_...@no.net> wrote:

> Function Exist(fname:string):Boolean;
> Var Ok:boolean;
>        f: file;
> begin
>     Ok :=false;
>     Assign(f,fname)
>    {$I-} reset(f) {$I+}
>     Ok:=(Ioresult=0);
>     If OK then Close(f);
>     Exist:=Ok;
> end;

> Borland pascal 7 with tppatch.exe applied.

> Windows 98 SE
> This function worked for the last 14 years from tp3 through bp7 on processors up to 2200mhz.

> This function always returns true.  It functions correctly on a different,
> slower machine whether it is compiled on the faster or slower machine.  I
> tried slowing the cpu down to 1600mhz with no change in results.

Are you sure it is that (slow <-> fast machine) E.g. does the 2200MHz really run '98, and not
some NT derivate like NT4,2000,XP ?

Other Threads