Difference between revisions of "TPoint"
From SCAR Divi Manual
Line 8: | Line 8: | ||
==Description== | ==Description== | ||
A structured type which holds a 2-dimension coordinate specified by the '''X''' and '''Y''' fields. | A structured type which holds a 2-dimension coordinate specified by the '''X''' and '''Y''' fields. | ||
+ | |||
+ | ==Example== | ||
+ | <source lang="scar"> | ||
+ | var | ||
+ | p: TPoint; | ||
+ | |||
+ | begin | ||
+ | p := Point(5, 6); | ||
+ | WriteLn('TPoint(' + IntToStr(p.X) + ',' + IntToStr(p.Y) + ')'); | ||
+ | end. | ||
+ | </source> | ||
==See Also== | ==See Also== | ||
− | *TPointArray | + | *[[TPointArray]] |
− | *Point | + | *[[Point]] |
− | *IntToPoint | + | *[[IntToPoint]] |
[[Category:Types]] | [[Category:Types]] | ||
[[Category:Structured Types]] | [[Category:Structured Types]] |
Revision as of 19:03, 26 June 2011
Contents
Definition
TPoint = packed record X, Y: Integer; end;
Description
A structured type which holds a 2-dimension coordinate specified by the X and Y fields.
Example
var p: TPoint; begin p := Point(5, 6); WriteLn('TPoint(' + IntToStr(p.X) + ',' + IntToStr(p.Y) + ')'); end.