mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-07 09:12:30 +02:00
23 lines
413 B
ObjectPascal
23 lines
413 B
ObjectPascal
Program Example43;
|
|
|
|
{ This program demonstrates the FindFirst function }
|
|
|
|
Uses sysutils;
|
|
|
|
Var Info : TSearchRec;
|
|
Count : Longint;
|
|
|
|
Begin
|
|
Count:=0;
|
|
If FindFirst ('*.pp',faAnyFile,Info)=0 then
|
|
begin
|
|
Repeat
|
|
Inc(Count);
|
|
With Info do
|
|
Writeln (Name:40,Size:15);
|
|
Until FindNext(info)<>0;
|
|
end;
|
|
FindClose(Info);
|
|
Writeln ('Finished search. Found ',Count,' matches');
|
|
|
|
End. |