ex43.pp 413 B

1234567891011121314151617181920212223
  1. Program Example43;
  2. { This program demonstrates the FindFirst function }
  3. Uses sysutils;
  4. Var Info : TSearchRec;
  5. Count : Longint;
  6. Begin
  7. Count:=0;
  8. If FindFirst ('*.pp',faAnyFile,Info)=0 then
  9. begin
  10. Repeat
  11. Inc(Count);
  12. With Info do
  13. Writeln (Name:40,Size:15);
  14. Until FindNext(info)<>0;
  15. end;
  16. FindClose(Info);
  17. Writeln ('Finished search. Found ',Count,' matches');
  18. End.