mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 19:29:31 +02:00
21 lines
412 B
ObjectPascal
21 lines
412 B
ObjectPascal
Program ex3;
|
|
|
|
{ Program to demonstrate TRect.Union }
|
|
|
|
Uses objects;
|
|
|
|
|
|
Var ARect,BRect,CRect : TRect;
|
|
|
|
begin
|
|
ARect.Assign(10,10,20,20);
|
|
BRect.Assign(15,15,25,25);
|
|
{ CRect is union of ARect and BRect }
|
|
CRect.Assign(10,10,25,25);
|
|
{ Calculate it explicitly}
|
|
ARect.Union(BRect);
|
|
If ARect.Equals(CRect) Then
|
|
Writeln ('ARect equals CRect')
|
|
Else
|
|
Writeln ('ARect does not equal CRect !');
|
|
end. |