如果我要在字符串中使用'{'和'}'该怎么办?(50分)

  • 主题发起人 volcanosh
  • 开始时间
V

volcanosh

Unregistered / Unconfirmed
GUEST, unregistred user!
delphi自动把这些这当作注释来处理,但这是我需要的字符,怎么处理?
 
1.放在单引号中 '{' '}' 没问题
2.用 #123 #125
 
在字符串中使用没问题如s:='asd'+'{'+'sdf}';
 
procedure TForm1.Button1Click(Sender: TObject);
var
a:string;
begin
a:='{234972342347}';
end;

end.

我试了,这样都没问题啊
 
多人接受答案了。
 
顶部