首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

字符串判断的有关问题,待

2012-02-28 
字符串判断的问题,在线等待!几年没写代码了,怎么XE2下面,原来的判断字符串的函数不能用了?function IsNumb

字符串判断的问题,在线等待!
几年没写代码了,怎么XE2下面,原来的判断字符串的函数不能用了?
function IsNumberic(Vaule:String):Boolean;
var
  i:integer;
begin
  Result:=true;
  Vaule:=Trim(Vaule);
  for i:=1 to length(Vaule) do
  begin
  if not Vaule[i] in ['0'..'9'] then
  begin
  result:=false;
  exit;
  end;
  end;
end;

[DCC Error] uOperation.pas(23): E2015 Operator not applicable to this operand type
改成AnsiString也不行,哪位帮解惑一下?....

[解决办法]
if not (Vaule[i] in ['0'..'9']) then

热点排行