home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,445 of 2,978   
   Marco van de Voort to Jim Bishop   
   Re: FreePascal - FindFirst and I/O Handl   
   04 May 07 19:29:47   
   
   From: marcov@stack.nl   
      
   On 2007-05-04, Jim Bishop  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)= 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   
   support 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)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca