Autor Beitrag
majolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334

Ubuntu 8.04, WinXP Prof.
D1, D6Pers, D7 Prof., D8 Prof., D2005 Pers
BeitragVerfasst: Mo 16.09.02 20:22 
Hi,

Wie wandele ich einen String in ein TString und umgekehrt um.
Gruß
majolo
aogwaba
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 109



BeitragVerfasst: Mo 16.09.02 21:19 
Hi!
Geht nicht, TStrings ist abstract. Du kannst nur eine davon abgeleitete Klasse instanzieren und den String dann anfügen bzw. auslesen:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var inString,outString:string;
myIndex:integer;
begin
inString:='test';
myList:=TStringList.create;
myIndex:=myList.add(inString);
outString:=myListr.strings[myIndex];
end;


cu
waba
majolo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334

Ubuntu 8.04, WinXP Prof.
D1, D6Pers, D7 Prof., D8 Prof., D2005 Pers
BeitragVerfasst: Di 17.09.02 17:03 
Hallo,

ja genau das habe ich gesucht.Wusste nur nicht mehr wie sich der Code zusammensetzt.Danke!
majolo