ight: INTEGER;
   end;

 var
  r1: Rectangle;

begin

 ShowText;
 New(r1);
 r1.width := 12;
 r1.height := 34;
 Writeln('The rect is ', r1.width : 2, 'x', r1.height : 2);

end.
</pre>

<h3>Creating a type with a method</h3>

<pre>
program ExampleMethod;

 type
  Rectangle = object
    width, height: INTEGER;
    procedure setwidth (w: INTEGER);
   end;

 var
  r1: Rectangle;

 procedure Rectangle.setwidth (w: INTEGER);
 begin
  width := w;
 end;

begin

 ShowText;
 New(r1);
 r1.width := 12;
 r1.height := 34;