Janilabo

Janilabo | TSAAppend() [SCAR Divi]

Apr 27th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.63 KB | None | 0 0
  1. {==============================================================================]  
  2.   Explanation: Appends TSA with x.                  
  3. [==============================================================================}
  4. procedure TSAAppend(var TSA: TStrArray; x: string);
  5. var
  6.   aL: Integer;
  7. begin
  8.   aL := (Length(TSA) + 1);
  9.   SetLength(TSA, aL);
  10.   TSA[(aL - 1)] := string(x);
  11. end;
  12.  
  13. var
  14.   tmp: TStrArray;
  15.   h, i: Integer;
  16.  
  17. begin
  18.   ClearDebug;  
  19.   tmp := ['Test0', 'Test1', 'Test2', 'Test3', 'Test4', 'Test5', 'Test6', 'Test7', 'Test8'];
  20.   TSAAppend(tmp, 'Test9');
  21.   h := High(tmp);
  22.   for i := 0 to h do
  23.     WriteLn(tmp[i]);
  24. end.
Advertisement
Add Comment
Please, Sign In to add comment