Difference between revisions of "TPADelete"
From SCAR Divi Manual
| Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
| − | procedure | + | procedure TPADelete(var TPA: TPointArray; const Index: Integer); |
</source> | </source> | ||
==Availability== | ==Availability== | ||
| − | SCAR Divi 3.26 > | + | SCAR Divi 3.28 > Current |
| + | |||
| + | ===Aliases=== | ||
| + | *TPARemove(SCAR Divi 3.26 > SCAR Divi 3.27) | ||
==Description== | ==Description== | ||
| − | + | Deletes the coordinate at a given position '''Index''' in a given [[TPointArray]] '''TPA'''. If the index is outside of the array bounds, nothing happens. | |
==Example== | ==Example== | ||
| Line 17: | Line 20: | ||
begin | begin | ||
TPA := [Point(0, 0), Point(2, 2), Point(5, 10)]; | TPA := [Point(0, 0), Point(2, 2), Point(5, 10)]; | ||
| − | + | TPADelete(TPA, 1); | |
WriteLn('TPointArray: ' + TPAToStr(TPA)); | WriteLn('TPointArray: ' + TPAToStr(TPA)); | ||
end. | end. | ||
Revision as of 09:52, 24 October 2011
Definition
procedure TPADelete(var TPA: TPointArray; const Index: Integer);
Availability
SCAR Divi 3.28 > Current
Aliases
- TPARemove(SCAR Divi 3.26 > SCAR Divi 3.27)
Description
Deletes the coordinate at a given position Index in a given TPointArray TPA. If the index is outside of the array bounds, nothing happens.
Example
var
TPA: TPointArray;
begin
TPA := [Point(0, 0), Point(2, 2), Point(5, 10)];
TPADelete(TPA, 1);
WriteLn('TPointArray: ' + TPAToStr(TPA));
end.Output:
TPointArray: (0,0);(5,10)