function IsStrANumber(NumStr : string) : boolean;
begin
result := true;
try
StrToInt(NumStr);
except
result := false;
end;
end;我原以为这样写是可以的,可是,当运行到//StrToInt(NumStr);时就出错了,try...except 没起到作用啊?
begin
result := true;
try
StrToInt(NumStr);
except
result := false;
end;
end;我原以为这样写是可以的,可是,当运行到//StrToInt(NumStr);时就出错了,try...except 没起到作用啊?
if strtofloatdef(NumStr, 0) = strtofloatdef(NumStr, 1) then
result := true;
else
result := false;