3

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;
0

1 Answer 1

4

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;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.