Difference between revisions of "TIAAddEx"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure TIAAddEx(var TIA: TIntArray; const Additions: TIntArray); </source> ==Availability== SCAR Divi 3.38 > Current ==D...")
 
Line 8: Line 8:
  
 
==Description==
 
==Description==
Adds the values from the [[TIntArray]] '''Additions''' to the values in '''TIA'''.
+
Adds the values from the [[TIntArray]] '''Additions''' to the values in '''TIA'''. The items in '''Additions''' are added in  the order they are given. When the end of '''Additions''' is reached, it will start again from the first item. When '''Additions''' is empty, '''TIA''' remains unchanged.
 
 
If Length('''TIA''') > Length('''Additions'''): '''TIA'''[Idx] is assigned '''Additions'''[Idx mod Length('''TIA''')].
 
  
 
==Example==
 
==Example==

Revision as of 17:56, 10 December 2012

Definition

procedure TIAAddEx(var TIA: TIntArray; const Additions: TIntArray);

Availability

SCAR Divi 3.38 > Current

Description

Adds the values from the TIntArray Additions to the values in TIA. The items in Additions are added in the order they are given. When the end of Additions is reached, it will start again from the first item. When Additions is empty, TIA remains unchanged.

Example

var
  TIA: TIntArray;  
 
begin
  TIA := [5, -7, 1, 6, 88];
  TIAAdd(TIA, 5);  
  WriteLn(TIAToStr(TIA));
end.

Output:

10,-2,6,11,93

See Also