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

« back to all changes in this revision

Viewing changes to docs/olinuxex/ex25.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 Example25;
2
 
 
3
 
{ Program to demonstrate the UTime function. }
4
 
 
5
 
Uses oldlinux;
6
 
 
7
 
Var utim : utimbuf;
8
 
    year,month,day,hour,minute,second : Word;
9
 
 
10
 
begin
11
 
  { Set access and modification time of executable source }
12
 
  GetTime (hour,minute,second);
13
 
  GetDate (year,month,day);
14
 
  utim.actime:=LocalToEpoch(year,month,day,hour,minute,second);
15
 
  utim.modtime:=utim.actime;
16
 
  if not Utime('ex25.pp',utim) then
17
 
    writeln ('Call to UTime failed !')
18
 
  else
19
 
    begin
20
 
    Write ('Set access and modification times to : ');
21
 
    Write (Hour:2,':',minute:2,':',second,', ');
22
 
    Writeln (Day:2,'/',month:2,'/',year:4);
23
 
    end;
24
 
end.