Difference between revisions of "TPoint"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> TPoint = packed record X, Y: Integer; end; ==Description== A structured type which holds a 2-dimension coordinate specified b...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
X, Y: Integer; | X, Y: Integer; | ||
end; | end; | ||
+ | </source> | ||
+ | |||
+ | ==Availability== | ||
+ | SCAR Divi 3.00 > Current | ||
==Description== | ==Description== | ||
− | A structured type which holds a 2- | + | A structured type which holds a 2-dimensional coordinate specified by the [[integer]] '''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> | ||
+ | |||
+ | Output: | ||
+ | TPoint(5,6) | ||
+ | |||
+ | ==See Also== | ||
+ | *[[TPointArray]] | ||
+ | *[[Point]] | ||
+ | *[[IntToPoint]] | ||
[[Category:Types]] | [[Category:Types]] | ||
[[Category:Structured Types]] | [[Category:Structured Types]] |
Latest revision as of 13:14, 3 July 2011
Definition
TPoint = packed record X, Y: Integer; end;
Availability
SCAR Divi 3.00 > Current
Description
A structured type which holds a 2-dimensional 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)