H
hotboy
Unregistered / Unconfirmed
GUEST, unregistred user!
我在窗体上放两个Edit,检验指针地址。发现下面的几种代码(其实就是是否两个Edit同时显示)结果不一样,对于@P,和P也迷糊。特请大师指点!<br>代码如下:<br>procedure TForm1.Button1Click(Sender: TObject);<br>var PInteger;<br>begin<br>Edit1.text:=IntToStr(Integer(@P));//显示1308200<br>Edit2.text:=IntToStr(Integer(P));//显示0<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var PInteger;<br>begin<br>Edit1.text:=IntToStr(Integer(P));//显示4358324<br>end;<br><br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var PInteger;<br>a:integer;<br>begin<br> a:=10;<br> P:=@a;<br> Edit1.Text:=IntToStr(Integer(@P));//显示1308200<br> Edit2.Text:=IntToStr(Integer(P));//显示1308196<br>end;<br><br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var PInteger;<br>a:integer;<br>begin<br> a:=10;<br> P:=@a;<br> Edit2.Text:=IntToStr(Integer(P));//显示1308200<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var PInteger;<br>a:integer;<br>begin<br> a:=10;<br> P:=@a;<br> Edit2.Text:=IntToStr(Integer(@P));//显示1308200<br>end;