Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {==============================================================================]
- Explanation: Returns TSA1 and TSA2 combined together.
- [==============================================================================}
- function TSACombine(TSA1, TSA2: TStrArray): TStrArray;
- var
- l1, l2, i: Integer;
- begin
- l1 := Length(TSA1);
- l2 := Length(TSA2);
- SetLength(Result, (l1 + l2));
- for i := 0 to (l1 - 1) do
- Result[i] := string(TSA1[i]);
- for i := 0 to (l2 - 1) do
- Result[(l1 + i)] := string(TSA2[i]);
- end;
- var
- tmp: TStrArray;
- h, i: Integer;
- begin
- ClearDebug;
- tmp := TSACombine(['a', 'b', 'c'], ['d', 'e', 'f', 'g']);
- h := High(tmp);
- for i := 0 to h do
- WriteLn(tmp[i]);
- end.
Advertisement
Add Comment
Please, Sign In to add comment