变量可能是别处传入,用来检查其合法性
//是否整型
function IsInt(AStr: string): Boolean;
var
Value, Code: Integer;
begin
Val(AStr, Value, Code);
Result := Code = 0;
end;
function IsInt(S: string): boolean;
var
Int: Int64;
begin
Result := true;
try
Int := StrToInt64(s);
except
Result := false;
end;
end