unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
function fieldstring(str:string): string;
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function TForm1.fieldstring(str:string): string;
var
s:string;
begin
s:= IntToStr(StrToInt(str));
Result := s;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
st:string;
st1:string;
begin
st:=Edit1.Text;
st1:=fieldstring(st);
ShowMessage(st1);
end;
end.