Hello,
I wonder if there is a built-in function or a better way to test a string to
see if its value is numeric then this:
function IsNumeric(sTemp: String; var bInteger: Boolean): Boolean;
begin
Result := True;
try
StrToInt(sTemp);
bInteger := True;
except
on E:EConvertError do begin
try
StrToFloat(sTemp);
bInteger := False;
except
on E:EConvertError do begin
Result := False;
end;
end;
end;
end;
end;
How do I suppress error messages generated by StrTo... so that they do not
show up.
I've tried setting NoErrMsg := True but it doesn't work with this function.
Thank you,
Sergei Stenkov
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"