Difference between revisions of "TEADelete"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure TEADelete(var TEA: TExtArray; const Index: Integer); </source> ==Availability== SCAR Divi 3.34 > Current ==Descripti...")
 
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
procedure TEADelete(var TEA: TExtArray; const Index: Integer);
+
function TEADelete(var TEA: TExtArray; const Index: Integer): Extended;
 
</source>
 
</source>
  
Line 8: Line 8:
  
 
==Description==
 
==Description==
Deletes the [[Extended|extended]] at a given position '''Index''' in a given [[TExtArray]] '''TEA'''. If the index is outside of the array bounds, the function throws an exception.
+
Deletes the [[Extended|extended]] at a given position '''Index''' in a given [[TExtArray]] '''TEA'''. The function returns the value it deleted from the array. If the index is outside of the array bounds, the function throws an exception.
  
 
==Example==
 
==Example==

Revision as of 15:41, 22 May 2012

Definition

function TEADelete(var TEA: TExtArray; const Index: Integer): Extended;

Availability

SCAR Divi 3.34 > Current

Description

Deletes the extended at a given position Index in a given TExtArray TEA. The function returns the value it deleted from the array. If the index is outside of the array bounds, the function throws an exception.

Example

var
  TEA: TExtArray;

begin
  TEA := [1.3, 2.5, 3];
  TEADelete(TEA, 1);
  WriteLn(TEAToStr(TEA));
end.

Output:

1,3

See Also