我怎么把字符串放进缓冲里?急急急!!!

tang_xue 2001-07-20 04:41:24
...全文
97 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
luofuchun 2001-07-20
  • 打赏
  • 举报
回复
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;
alphen 2001-07-20
  • 打赏
  • 举报
回复
procedure p(str:string);
var
S:Pchar;
begin
strcopy(S,str);
end;
delphi_user 2001-07-20
  • 打赏
  • 举报
回复
关注
sweihua 2001-07-20
  • 打赏
  • 举报
回复
以上正确
BaldZhang 2001-07-20
  • 打赏
  • 举报
回复

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

xzgyb 2001-07-20
  • 打赏
  • 举报
回复
什么意思
string s;
s:='sdfsdf';
不就在缓冲区里吗
tang_xue 2001-07-20
  • 打赏
  • 举报
回复
怎么没人回答?

5,379

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧