summaryrefslogtreecommitdiff
path: root/fpcdocs/sysutex/ex31.pp
blob: 82526362176680d77ce6c0d4aa4ad0ec466f7965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Program Example31;

{ This program demonstrates the DeleteFile function }

Uses sysutils;

Var
  Line : String;
  F,I : Longint;

Begin
  F:=FileCreate('test.txt');
  Line:='Some string line.'#10;
  For I:=1 to 10 do
    FileWrite (F,Line[1],Length(Line));
  FileClose(F);
  DeleteFile('test.txt');
End.