//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "SysUtilsStrToIntDef.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: SysUtilsStrToIntDef
// Routine: SysUtils.StrToIntDef

// BeginCode
/*
This example uses two edit boxes and a button on a form. The
user enters a number in the first edit box and clicks the
button. If the number entered was a valid integer, the same
value appears in the second edit box. If the number was not
a valid integer, the default value of 1000 appears in the
second edit box:
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  int Number = StrToIntDef(Edit1->Text, 1000);
  Edit2->Text = IntToStr(Number);
}
// EndCode
// EndExample: SysUtilsStrToIntDef
//---------------------------------------------------------------------------
