Reputation: 263
loaded text from web which is like value1=1,value2=2,value3=3 bla bla bla
I actually wanted to get value for declared variables is it possible ?
//loaded from web address
value1=1,value2=2,value3=3
Procedure getvarvaules;
var
value1:string ='1';
value2:string ='2';
value3:string ='3';
begin
end;
Upvotes: 3
Views: 234
Reputation: 47704
Use a TStringList:
var
lst: TStringList;
begin
lst := TStringList.Create;
try
lst.Commatext := { variable containing the webresult };
value1 := lst.Values['value1'];
value2 := lst.Values['value2'];
value3 := lst.Values['value3'];
finally
lst.Free;
end;
end;
Upvotes: 4