在form1中有一button 与listbox
procedure TForm1.Button1Click(Sender: TObject);
var
myint1,i,j,n,m : integer ;
mystr : string ;
begin
n := ListBox1.Items.Count ;
for i := 0 to n-1 do
begin
mystr := ListBox1.Items.Strings[i] ;
m := length(mystr) ;
myint1 := 0 ;
for j := 1 to m do
begin
try
if mystr[j] in ['0','1','2','3','4','5','6','7','8','9'] then
myint1 := strtoint(inttostr(myint1)+mystr[j]) ;