Smart pascal source code
type
TRec = record
Left, Right: Integer;
procedure WriteLnMe;
begin
WriteLn(Left);
WriteLn(Right);
end;
end;
procedure DoIt(r1, r2: TRec);
begin
r1.WriteLnMe;
r2.WriteLnMe;
end;
procedure StartIt(r1, r2: TRec);
begin
DoIt(r1, r2);
DoIt(r2, r1);
end;
var r1, r2: TRec;
r1.Left := 1;
r1.Right := 2;
r2.Left := 3;
r2.Right := 4;
StartIt(r1, r2);
StartIt(r2, r1);
{<<< RESULT - CONSOLE LOG >>>
-----------------------------
12
34
34
12
34
12
12
34
-----------------------------
{<<<<<<<<< THE END >>>>>>>>>}