IntToStr (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example uses two edit controls, a button, and a label on a form. When the button is clicked, the integers in the edit controls are multiplied together and the result is displayed in the label.

Code

procedure TForm1.Button1Click(Sender: TObject);
begin
  try
    Label1.Caption :=
      SysUtils.IntToStr(StrToInt(Edit1.Text) * StrToInt(Edit2.Text));
  except
    ShowMessage('You must specify integer values. Please try again.');
  end;
end;

Uses

Personal tools
Assistance