summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/bench/shootout/obsolete/strcat.pp
blob: af155ac967432c7b1864e41fcef2254a2f20da59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ String Concatenation }

program strcat;

uses SysUtils;
var
    NUM, i : longint;
    str : string;

begin
    if ParamCount = 0 then NUM := 1
    else NUM := StrToInt(ParamStr(1));
    if NUM < 1 then NUM := 1;

    str := '';
    For i := 1 To NUM Do
        str := str + 'hello'#13;
    WriteLn( Longint(Length(str)) );
    WriteLn( str );
end.