3
{ Program to demonstrate the AssignStream function. }
12
if not (paramstr(1)='-son') then
14
Writeln ('Calling son');
15
Assignstream (Si,So,'./ex38 -son');
18
writeln ('AssignStream failed !');
21
Writeln ('Speaking to son');
24
writeln (so,'Hello son !');
25
if ioresult<>0 then writeln ('Can''t speak to son...');
27
For i:=1 to 3 do writeln (so,'Hello chap !');
32
writeln ('Father: Son said : ',S);
34
Writeln ('Stopped conversation');
36
Writeln ('Put down phone');
40
Writeln ('This is the son ');
41
While not eof (input) do
44
if pos ('Hello son !',S)<>0 then
45
Writeln ('Hello Dad !')
47
writeln ('Who are you ?');