3
{ Program to demonstrate the Link and UnLink functions. }
10
Assign (F,'test.txt');
12
Writeln (F,'This is written to test.txt');
14
{ new.txt and test.txt are now the same file }
15
if not Link ('test.txt','new.txt') then
16
writeln ('Error when linking !');
17
{ Removing test.txt still leaves new.txt }
18
If not Unlink ('test.txt') then
19
Writeln ('Error when unlinking !');
28
{ Remove new.txt also }
29
If not Unlink ('new.txt') then
30
Writeln ('Error when unlinking !');