什么意思
string s;
s:='sdfsdf';
不就在缓冲区里吗

解决方案 »

  1.   


    move(PChar(S)^, buffer, Length(S));
      

  2.   

    procedure p(str:string);
    var
      S:Pchar;
    begin
      strcopy(S,str);
    end;
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);var
      MyList: TStringList;
      Index: Integer;
    begin
      MyList := TStringList.Create;
      try
        MyList.Add('Animals');
        MyList.Add('Flowers');    MyList.Add('Cars');    MyList.Sort;   { Find will only work on sorted lists! }
        if MyList.Find('Flowers', Index) then
        begin
          ListBox1.Items.AddStrings(MyList);
          Label1.Caption := 'Flowers has an index value of ' + IntToStr(Index);
        end;
      finally
      MyList.Free;
      end;end;