Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {==============================================================================]
- Explanation: Returns copy of TSA.
- [==============================================================================}
- function TSACopy(TSA: TStrArray): TStrArray;
- var
- h, i: Integer;
- begin
- h := High(TSA);
- SetLength(Result, (h + 1));
- for i := 0 to h do
- Result[i] := string(TSA[i]);
- end;
- var
- h, i: Integer;
- a, b: TStrArray;
- begin
- ClearDebug;
- a := ['Test1', 'Test2', 'Test3', 'Test4'];
- b := TSACopy(a);
- SetLength(a, 0);
- h := High(b);
- for i := 0 to h do
- WriteLn(b[i]);
- SetLength(b, 0);
- end.
Advertisement
Add Comment
Please, Sign In to add comment