[fpc-pascal] FindFirst/FindNex question

Tomas Hajny XHajT03 at hajny.biz
Sun Sep 13 22:23:41 CEST 2026


On 2026-09-13 19:50, Bart via fpc-pascal wrote:
> On Sun, Sep 13, 2026 at 7:35 PM Tomas Hajny via fpc-pascal
> <fpc-pascal at lists.freepascal.org> wrote:
> 
>> However, you don't show the end of
>> the repeat until cycle - depending on the exact condition there, the
>> check might be relevant for the repetitions (not that I'd expect it,
>> just for completeness sake).
> 
> The rest of the code is just iignored in that case:
> 
> ====
>       repeat
>         // check if special file
>         if (FileInfo.Name='.') or (FileInfo.Name='..') or
> (FileInfo.Name='') then
>           continue;
>         //handle file or dir
>       until {$IFDEF
> FPC_DOTTEDUNITS}System.{$ENDIF}SysUtils.FindNext(FileInfo)<>0;
> ====

Indeed, then it cannot make any difference either because FindNext is 
checked to be 0 there as well.

Tomas


More information about the fpc-pascal mailing list