unit SysUtilsStrToInt;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: SysUtilsStrToInt
// Routine: SysUtils.StrToInt

// BeginCode
{
This example uses two edit boxes and a button on a form. When the user clicks
the button, the code converts the values in the edit boxes to numbers, adds them,
and displays a message indicating the sum:
}
procedure TForm1.Button1Click(Sender: TObject);
var
  I: Integer;
  J: Integer;
begin
  I := StrToInt(Edit1.Text);
  J := StrToInt(Edit2.Text);
  ShowMessage(IntToStr(I + J));
end;
// EndCode
// EndExample: SysUtilsStrToInt
end.
