[fpc-pascal] FPC docs about FindFirst
Michael Van Canneyt
michael at freepascal.org
Sun Sep 22 23:16:29 CEST 2019
On Sun, 22 Sep 2019, Tomas Hajny wrote:
> On 2019-09-22 23:04, Michael Van Canneyt wrote:
>> On Sun, 22 Sep 2019, Ched wrote:
> .
> .
>>> From https://www.freepascal.org/port.html about porting Turbo Pascal
>>> codes:
>>>
>>> > the dos unit Findfirst() call must always be followed by a Findclose to
> release some resource.
>>>
>>> What's right ?
>>
>> The sysutils one. I will adapt the 'port' document.
>
> As mentioned by Sven, there's probably no reason for any adapting it -
> people porting Turbo Pascal code use Dos.Find* rather than the sysutils
> version and since Dos.FindFirst doesn't return a handle directly (it's
> hidden within the SearchRec record), calling Dos.FindClose always is the
> safest bet.
Ah, I thought the dos one meanwhile called the sysutils one.
In that case, you're probably right.
Michael.
More information about the fpc-pascal
mailing list