没有专门的判断函数function IsNumber(const strValue:string):Boolean; begin Result:=True; try StrToInt64(strValue); except Result:=False; end; end;或者: function IsNumber(const strValue:string):Boolean; var i,E: Integer; begin Result:=True; Val(strValue,i,E); if e<>0 then Result:=False; end;
begin
Result:=True;
try
StrToInt64(strValue);
except
Result:=False;
end;
end;或者:
function IsNumber(const strValue:string):Boolean;
var
i,E: Integer;
begin
Result:=True;
Val(strValue,i,E);
if e<>0 then Result:=False;
end;