Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {==============================================================================]
- Explanation: Returns TSA of x, count being the size of the result.
- [==============================================================================}
- function TSAOfString(x: string; count: Integer): TStrArray;
- var
- i: Integer;
- begin
- if (count > 0) then
- begin
- SetLength(Result, count);
- for i := 0 to (count - 1) do
- Result[i] := string(x);
- end else
- SetLength(Result, 0);
- end;
- var
- tmp: TStrArray;
- h, i: Integer;
- begin
- ClearDebug;
- tmp := TSAOfString('Test', 3);
- h := High(tmp);
- for i := 0 to h do
- WriteLn(tmp[i]);
- end.
Advertisement
Add Comment
Please, Sign In to add comment