Difference between revisions of "TPoint"

From SCAR Divi Manual
Jump to: navigation, search
(Description)
(Example)
Line 19: Line 19:
 
end.
 
end.
 
</source>
 
</source>
 +
 +
Output:
 +
TPoint(5,6)
  
 
==See Also==
 
==See Also==

Revision as of 23:37, 26 June 2011

Definition

TPoint = packed record
  X, Y: Integer;
end;

Description

A structured type which holds a 2-dimension coordinate specified by the integer X and Y fields.

Example

var
  p: TPoint;

begin
  p := Point(5, 6);
  WriteLn('TPoint(' + IntToStr(p.X) + ',' + IntToStr(p.Y) + ')');
end.

Output:

TPoint(5,6)

See Also