Hi, in v4.80 bèta I have seen in the software debugger a string concat problem:
Testcode:
Code: Select all
Var S1, S2, S3: string[10];
...
S1 := 'xxxxxxx';
S2 := 'yyy';
S3 := 'zzzz';
StrCat(S1, S2); // Ok , result = 'xxxxxxxyyy' + ending 0
S3 := '';
S3 := S1 + S2; // wrong, result = 'xxxxxxxyyyy' (no ending zero, 4 times 'y')
// side-effect: S2 becomes 'yy' (1 character shorter)
S3 := '';
S3 := S1 + 'yy'; // wrong, result = 'xxxxxxxyyyy' (no ending zero, 4 times 'y')
// side-effect: S2 becomes 'y' (again 1 character shorter)
I can not really believe that above is true. Can someone confirm (or deny) this?
Thanks in advance.