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

« back to all changes in this revision

Viewing changes to fpcdocs/refex/ex18.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 Example18;
 
2
 
 
3
{ Program to demonstrate the Eof function. }
 
4
 
 
5
Var T1,T2 : text;
 
6
    C : Char;
 
7
 
 
8
begin
 
9
  { Set file to read from. Empty means from standard input.}
 
10
  assign (t1,paramstr(1));
 
11
  reset (t1);
 
12
  { Set file to write to. Empty means to standard output. }
 
13
  assign (t2,paramstr(2));
 
14
  rewrite (t2);
 
15
  While not eof(t1) do
 
16
    begin
 
17
    read (t1,C);
 
18
    write (t2,C);
 
19
    end;
 
20
  Close (t1);
 
21
  Close (t2);
 
22
end.