Difference between revisions of "TPARemoveEx"
From SCAR Divi Manual
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | procedure | + | procedure TIARemoveEx(var TIA: TIntArray; const Int: Integer; const All: Boolean); |
</source> | </source> | ||
==Availability== | ==Availability== | ||
SCAR Divi 3.28 > Current | SCAR Divi 3.28 > Current | ||
− | |||
− | |||
− | |||
==Description== | ==Description== | ||
− | Removes the last occurrence of a given [[ | + | Removes the last occurrence of a given [[Integer|integer]] '''Int''' in a [[TIntArray]] '''TIA''' if '''All''' is [[false]]. If '''All''' is [[true]], it will remove every occurrences of '''Int'''. |
==Example== | ==Example== | ||
<source lang="scar"> | <source lang="scar"> | ||
var | var | ||
− | + | TIA: TIntArray; | |
begin | begin | ||
− | + | TIA := [1, 5, 4, 8, 7, 4, 6]; | |
− | + | TIARemoveEx(TIA, 4, True); | |
− | WriteLn( | + | WriteLn(TIAToStr(TIA)); |
end. | end. | ||
</source> | </source> | ||
Output: | Output: | ||
− | + | 1,5,8,7,6 | |
==See Also== | ==See Also== | ||
− | *[[ | + | *[[TIARemove]] |
− | *[[ | + | *[[TIADelete]] |
− | *[[ | + | *[[TIAUnique]] |
− | *[[ | + | *[[TIAAppend]] |
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] |
Revision as of 19:14, 24 October 2011
Definition
procedure TIARemoveEx(var TIA: TIntArray; const Int: Integer; const All: Boolean);
Availability
SCAR Divi 3.28 > Current
Description
Removes the last occurrence of a given integer Int in a TIntArray TIA if All is false. If All is true, it will remove every occurrences of Int.
Example
var TIA: TIntArray; begin TIA := [1, 5, 4, 8, 7, 4, 6]; TIARemoveEx(TIA, 4, True); WriteLn(TIAToStr(TIA)); end.
Output:
1,5,8,7,6