Entwickler-Ecke

Algorithmen, Optimierung und Assembler - chr and string


chukalv - Fr 24.03.06 11:43
Titel: chr and string
Don`t get it why it`s not working... Are there some string types not correctly?


Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure something;
var
i: integer;
row : string;
begin

for i := 1 to 10 do row := row + chr(random(25)+97);

ShowMessage(row); // gives allways empty out... Should give something like 'azhsnabapq'

end;


chaoslion - Fr 24.03.06 11:49

Ive tested your code and it works, so i dont get what your problem is..
eq row= "aavfgqhejk"


jasocul - Fr 24.03.06 11:51

I can not see any bug in this code.
Try debugging and look if the variable row will change.


chukalv - Fr 24.03.06 12:01

Don`t get it. Nothing changed, just restarted Delphi and everything goes...