本文整理自网络,侵删。
procedure TForm1.Btnx_1Click(Sender: TObject);var StrxA:string; PStrA:PChar;begin StrxA:='330226198501017036'; Application.MessageBox(PChar(StrxA),''); GetMem(PStrA,100); StrCopy(PStrA,PChar(StrxA)); Application.MessageBox(PStrA,'');end;
procedure TForm1.Btnx_2Click(Sender: TObject);const P1: PChar = 'CodeGear'; P2: PChar = 'Delphi';var S: array[0..15] of Char;begin StrCopy(S, P1); StrCat(S, ' '); StrCat(S, P2); ShowMessage(StrPas(S)); {CodeGear Delphi} ShowMessage(S); {CodeGear Delphi}end;
相关阅读 >>
Delphi adoconnection1连接mssql数据库方法
Delphi d10.x 安卓app开发中按返回键后程序不退出程序的方法
在xp/2k 下实现 win+ctrl+del 等键的屏蔽的方法
Delphi: ttreeview 中禁止双击事件展开或关闭节点
更多相关阅读请进入《Delphi》频道 >>