{ Testing  the assignment operator, under a simple DOS program
  ------------------------------------------------------------}
program tEx060;

Uses tEx060Unit; // To do some test with the assignment operator.

var glf : boolean; // necessary to use a special assignment operator

procedure Test1;
//==============
// Test the assignment operator  :=
// Unfortunatly, the assignment operator cannot be defined as I would like.
// See comments in tEx060Unit.pp
// Thus I use the boolean operator  <=  as an assignment operator,
// ignoring the result. See comments in  tEx061Unit.pp
var
  rR1,rR2,rR3 : RRecTest;
begin
rR1.nAA:=111;  rR1.nBB:=211;  rR1.nCC:=311;
rR2.nAA:=122;  rR2.nBB:=222;  rR2.nCC:=322;
rR3.nAA:=133;  rR3.nBB:=233;  rR3.nCC:=333;

glf:=rR1<=rR2;
writeln('rR1=', rR1.nAA:5, rR1.nBB:5, rR1.nCC:5);
writeln('rR2=', rR2.nAA:5, rR2.nBB:5, rR2.nCC:5);

// glf is ignored and not interesting.
// The  <=  operator is used as an assignment, and it works well.
glf:=rR1<=rR2 + rR3;
writeln('rR1=', rR1.nAA:5, rR1.nBB:5, rR1.nCC:5);

writeln;
writeln('The := operator doesn''t give the wanted result. The filed nCCC is also copied');
rR1:=rR2 + rR3;
writeln('rR1=', rR1.nAA:5, rR1.nBB:5, rR1.nCC:5);

writeln('Press return to quit');
readln;
end;  // Test1

Begin // MAIN ******
Test1;
End.

