D6中有没有左右截取函数 :有,查看帮助-DELETE!
有没有把字符转化成ascll码的函数: 有。
还有下面的程序为什么出错
type 
  tint=0..255;
  t=set of tint;
begin
  if 253 in t then showmessage('in!');
end;
类型不对,253是字符还是数字?

解决方案 »

  1.   

    d6没有左右截取函数,要自己编
    function GetLeft(s: string; count: integer): string;
    //------------------------------------------------------------------------------------------------
    //(1) 功  能 :   取左串
    //(2) 参  数 :   s-要取左串的字符串
    //                count-所要取字符的个数
    //(3) 返回值 :   取左串后的字符串
    //(4) 作成者 :   
    //------------------------------------------------------------------------------------------------begin
      delete(s, count + 1, length(s) - count);
      Result := s;
    end;function GetRight(s: string; count: integer): string;
    //------------------------------------------------------------------------------------------------
    //(1) 功  能 :   取右串
    //(2) 参  数 :   s-要取右串的字符串
    //                count-所要取字符的个数
    //(3) 返回值 :   取右串后的字符串
    //(4) 作成者 :   
    //------------------------------------------------------------------------------------------------begin
      delete(s, 1, length(s) - count);
      Result := s;
    end;
    字符转ascll用ord()函数
      

  2.   

    D6中有左右截取函数:LeftStr,RightStr;字符转换为ascII用ord()函数,反过来用Char();