procedure TForm1.Button1Click(Sender: TObject);
var
Data : cardinal;
Ed : String;
begin
Ed := Edit1.Text;
Data:= inttostr(Ed); // < Error
end;
end.
Should be,
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
Data : cardinal; //<- Why Cardinal, Integer would suffice ?
begin
Data := StrToInt(Edit1.Text);
end;
end.
Should produce the desired result without an error.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum