Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Borland > Re: FreePascal ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 7 Topic 1027 of 1114
Post > Topic >>

Re: FreePascal - FindFirst and I/O Handles Used

by Jim Bishop <bishopjp@[EMAIL PROTECTED] > May 5, 2007 at 01:16 AM

Wow... thanks for pointing out the FindClose.  Works great!

I'd never have found that on my own.  I wonder how many other TP->FPC 
gotcha's I don't know about.  (Is that an unknown unknown or a known 
unknown? to quote a famous ex US cabinet member).

Jim

Marco van de Voort wrote:
> On 2007-05-04, Jim Bishop <bishopjp@[EMAIL PROTECTED]
> wrote:
>> Is this a compiler bug?  Configuration bug? HW bug?  Or how can I free
a 
>> handle that FindFirst apparantly uses?  Workarounds?
> 
> findclose.  Dos had static filehandles and would just RTE at some point.
> With dynamic filehandles you need it.
> 
> In Delphi (sysutils) it changed to return a value to properly detect if
it
> needs closing, the skeleton then becomes:
> 
> if findfirst(arguments)=<something> then
>   begin
>    repeat 
>    until not findnext or done;
>    findclose
>   end;
> 
> Probably with unit dos you need to check ioresult or doserror to get the
same.
> I can't exactly what, since I have used sysutils pretty much exclusively
> since 2003 (when what would become 2.0. started to mature).
> 
> This also because the sysutils one also allows longer paths on systems
that
> sup****t it, because it is not limited to shortstring length.
> 
> Nearly all unit dos file-io and path functions have a better equivalent
in
> unit sysutils. (the major difference allowing longer paths, which is
quite
> annoying on Unix otherwise)
> 
> 
>
 




 7 Posts in Topic:
FreePascal - FindFirst and I/O Handles Used
Jim Bishop <bishopjp@[  2007-05-04 14:01:22 
Re: FreePascal - FindFirst and I/O Handles Used
Marco van de Voort <ma  2007-05-04 19:29:47 
Re: FreePascal - FindFirst and I/O Handles Used
Jim Bishop <bishopjp@[  2007-05-05 01:16:13 
Re: FreePascal - FindFirst and I/O Handles Used
Marco van de Voort <ma  2007-05-05 10:04:46 
Re: FreePascal - FindFirst and I/O Handles Used
Jim Bishop <bishopjp@[  2007-05-05 12:04:31 
Re: FreePascal - FindFirst and I/O Handles Used
Marco van de Voort <ma  2007-05-05 14:00:22 
Re: FreePascal - FindFirst and I/O Handles Used
Jonas Maebe <Jonas.Mae  2007-05-07 11:00:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 2:43:13 CDT 2008.