~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to docs/sysutex/ex43.pp

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Program Example43;
2
 
 
3
 
{ This program demonstrates the FindFirst function }
4
 
 
5
 
Uses SysUtils;
6
 
 
7
 
Var Info : TSearchRec;
8
 
    Count : Longint;
9
 
 
10
 
Begin
11
 
  Count:=0;
12
 
  If FindFirst ('*',faAnyFile and faDirectory,Info)=0 then
13
 
    begin
14
 
    Repeat
15
 
      Inc(Count);
16
 
      With Info do
17
 
        begin
18
 
        If (Attr and faDirectory) = faDirectory then
19
 
          Write('Dir : ');
20
 
        Writeln (Name:40,Size:15);
21
 
        end;
22
 
    Until FindNext(info)<>0;
23
 
    end;
24
 
  FindClose(Info);
25
 
  Writeln ('Finished search. Found ',Count,' matches');
26
 
 
27
 
End.
 
 
b'\\ No newline at end of file'