summaryrefslogtreecommitdiff
path: root/fpcdocs/refex/ex5.pp
blob: 18d8fe91325af694aeb1ac51139a4797877c5032 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Program Example5;

{ Program to demonstrate the Assign function. }

Var F : text;

begin
  Assign (F,'');
  Rewrite (f);
  { The following can be put in any file by redirecting it
    from the command line.}
  Writeln (f,'This goes to standard output !');
  Close (f);
  Assign (F,'Test.txt');
  rewrite (f);
  writeln (f,'This doesn''t go to standard output !');
  close (f);
end.