1.delphiä¸pcharå^charçåºå«
delphiä¸pcharå^charçåºå«
pcharï¼ç±»åæ¯ä¸ä¸ªæå空å符ç»æçå符串
^charï¼æ¯ä¸ä¸ªå符æéãæ¯ä¸ªæéï¼éé¢çå 容æ¯å符ã
var
c :string;
d :pchar;
e :^char;
f :pchar;
g,仓库商联达电商系统源码g1:Pchar;
h :^char;
i:integer;
begin
setlength(c,);
for i:= 1 to 2 do
begin c[i] := 'a'; end;
f := @c[1]; //ä»åºå 容
g := @c; //é¨çå·
g1 :=pchar(c); //ä»åºå 容ï¼ådä¸æ ·
e := @c[1]; //ä»åº
d := @c[1]; //ä»åºå 容
h := @c;
showmessage(f); //aa
showmessage(g); //ægèµå¼çæ¯æéå°åï¼æ¾ç¤ºå½ç¶æ¯ä¹±ç äº,å¯ä»¥æ¹ä¸ºä¸ä¸å¥ï¼æ¾ç¤ºå 容
showmessage(g1);
showmessage(e^); //a
showmessage(d); //aa
showmessage(d^); //a
// showmessage(h); //é误 h,eæ¯æé ä¸è½æå符æ¾ç¤ºshowmessage(IntToStr(integer(h)));
// showmessage(e); //é误
showmessage(c); //aa
end;
2024-12-24 10:55
2024-12-24 10:49
2024-12-24 10:17
2024-12-24 10:05
2024-12-24 09:27
2024-12-24 08:59
2024-12-24 08:47
2024-12-24 08:46