~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to docs/objectex/ex1.pp

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Program ex1;
2
 
 
3
 
{ Program to demonstrate TRect.Empty }
4
 
 
5
 
Uses objects;
6
 
 
7
 
 
8
 
Var ARect,BRect : TRect;
9
 
    P : TPoint;
10
 
 
11
 
begin
12
 
  With ARect.A do
13
 
    begin
14
 
    X:=10;
15
 
    Y:=10;
16
 
    end;
17
 
  With ARect.B do
18
 
    begin
19
 
    X:=20;
20
 
    Y:=20;
21
 
    end;
22
 
  { Offset B by (5,5) }
23
 
  With BRect.A do
24
 
    begin
25
 
    X:=15;
26
 
    Y:=15;
27
 
    end;
28
 
  With BRect.B do
29
 
    begin
30
 
    X:=25;
31
 
    Y:=25;
32
 
    end;
33
 
  { Point }
34
 
  With P do
35
 
    begin
36
 
    X:=15;
37
 
    Y:=15;
38
 
    end;
39
 
  Writeln ('A empty : ',ARect.Empty);
40
 
  Writeln ('B empty : ',BRect.Empty);
41
 
  Writeln ('A Equals B : ',ARect.Equals(BRect));
42
 
  Writeln ('A Contains (15,15) : ',ARect.Contains(P));
43
 
end.
 
 
b'\\ No newline at end of file'