如上!网上找不到

解决方案 »

  1.   

    用一个常量数组就可以了
    const IA:array [0..9] of char ('1','2',...'0');
    begin
    if 值 <> IA then
    showmessage('不是数字')
    else
    showmessage('这是一个数字')
    end;
      

  2.   

    if StrToIntDef(yourstring,-10000)=-10000 then
    {用默认判断}
    ...
      

  3.   

    procedure TForm1.Btn1Click(Sender: TObject);
    var i:integer;
    begin
      if TryStrToint('1234',i) then Showmessage('是数字')
      else Showmessage('不是数字');
    end;