~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to docs/linuxex/ex28.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
program example28;
2
 
 
3
 
{ Program to demonstrate the FStat function. }
4
 
 
5
 
uses BaseUnix;
6
 
    
7
 
var f : text;    
8
 
    i : byte;
9
 
    info : stat;
10
 
    
11
 
begin
12
 
  { Make a file }
13
 
  assign (f,'test.fil');
14
 
  rewrite (f);
15
 
  for i:=1 to 10 do writeln (f,'Testline # ',i);
16
 
  close (f);
17
 
  { Do the call on made file. }
18
 
  if fpstat ('test.fil',info)<>0 then 
19
 
     begin
20
 
       writeln('Fstat failed. Errno : ',fpgeterrno);
21
 
       halt (1);
22
 
     end;
23
 
  writeln;
24
 
  writeln ('Result of fstat on file ''test.fil''.');
25
 
  writeln ('Inode   : ',info.st_ino);
26
 
  writeln ('Mode    : ',info.st_mode);
27
 
  writeln ('nlink   : ',info.st_nlink);
28
 
  writeln ('uid     : ',info.st_uid);
29
 
  writeln ('gid     : ',info.st_gid);
30
 
  writeln ('rdev    : ',info.st_rdev);
31
 
  writeln ('Size    : ',info.st_size);
32
 
  writeln ('Blksize : ',info.st_blksize);
33
 
  writeln ('Blocks  : ',info.st_blocks);
34
 
  writeln ('atime   : ',info.st_atime);
35
 
  writeln ('mtime   : ',info.st_mtime);
36
 
  writeln ('ctime   : ',info.st_ctime);
37
 
  { Remove file }  
38
 
  erase (f);    
39
 
end.
 
 
b'\\ No newline at end of file'