function Copy(S; Index, Count: Integer): string;

解决方案 »

  1.   

    你可以用Delphi中的Copy函数。
    function Copy(S; Index, Count: Integer): string;
    如str1:='delphi5.0';
    str2:=copy(str1,1,3);//str2的内容为del
    str2:=copy(str1,2,3);//str2.内容为elp
    OK?
      

  2.   

    你可以用Delphi中的Copy函数。
    function Copy(S; Index, Count: Integer): string;
    index 为字符在串S中的位置号,Count为从Index开始后要截取的长度
    如str1:='delphi5.0';
    str2:=copy(str1,1,3);//str2的内容为del
    str2:=copy(str1,2,3);//str2.内容为elp
    OK?
      

  3.   

    谢谢两位,我知道该怎么做了,在此之前,我是这么作的:
    定义一个类型为String[2]的变量,以此为中介传递数据