I have the following code that adds the contents of a button and a space after clicking
procedure TForm3.Button1Click(Sender: TObject);
begin
if count = 0 then
Edit1.Text := Edit1.Text + TLabel(Sender).caption+ ' ';
if count = 1 then
begin
Edit2.Text := Edit2.Text + TLabel(Sender).caption+ ' ';
end;
end;
Saida: Dose = Max + Min
and another situation for number, which does not apply the spaces:
procedure TForm3.Button29Click(Sender: TObject);
begin
if count = 0 then
Edit1.Text := Edit1.Text + TLabel(Sender).caption;
if count = 1 then
begin
Edit2.Text := Edit2.Text + TLabel(Sender).caption;
end;
end;
Saida: Dose = 10
But I was thinking that after the number could find a text and the way I would do the character after the number would come out
Saida: Dose = 10AND 20
Where the correct one would be:
Saida: Dose = 10 AND 20
How to handle the function so that when the next character after the number is a the letter, it adds a space?