Remy Lebeau 1394 Posted May 3, 2023 (edited) 8 hours ago, microtronx said: simply change your line from x := StrToInt('x'); to x := StrToInt(inttostr(x)); crazy, but will work. But I do not understand why someone would do this In that case, you could just get rid of the offending StrToInt() altogether: procedure TFormSimpleVariable.ButtonShowValueClick(Sender: TObject); begin //x := StrToInt('x'); LabelResult.Caption := 'The value of x is ' + IntToStr(x); end; But that doesn't jive with what @357mag is asking for in the first place. Edited May 3, 2023 by Remy Lebeau Share this post Link to post
microtronx 38 Posted May 4, 2023 (edited) 16 hours ago, Remy Lebeau said: In that case, you could just get rid of the offending StrToInt() altogether: procedure TFormSimpleVariable.ButtonShowValueClick(Sender: TObject); begin //x := StrToInt('x'); LabelResult.Caption := 'The value of x is ' + IntToStr(x); end; But that doesn't jive with what @357mag is asking for in the first place. Yes I know, but I was unable to fully comprehend the question. Edited May 4, 2023 by microtronx Share this post Link to post