若是汉字怎么判断呢?它的ASCI是多少呢?

解决方案 »

  1.   

    所有的汉字(这里指GB码)两个字节最高位都是1,也就是说汉字的编码两个字节都大于0x7F。
      

  2.   

    如果只是判断是不是数字,那好办,
    try
      StrToInt(Edit1.Text);
    except
      ShowMessage('error');
      

  3.   

    try
     strtofloat(edit1.text);
    except 
    on econverterror do
      begin
       application.messagebox('','',mb_iconinformation+mb_ok);  
      end;
      

  4.   

    将Edit里的text赋予string的变量,然后用
    for i:=1 to length(string) do
    if string[i] 的 ord>255 那就是汉字
      

  5.   

    楼上那位,好象ord大于128才是汉字吧。
      

  6.   

    for i:=0 to length(edit1.text) then
    begin
      if edit1.text[i]>128 then
           showmessage('是汉字');
    end;
      

  7.   

    zhangzgweida(雏鹰),cds27(冰封):
       多谢各位的帮助,上两位兄台的方法已经通过,谢谢!
      现给两位加分.