unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
type
TTest = class
type
TRecord = record // 加大不影响F1的相对位置8
ABC: Integer;
ABC2: Integer;
end;
public
procedure Test();
public
F0: Integer;
F1: Integer;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Lt: TTest;
begin
Lt := TTest.Create;
ShowMessage(Format('%d', [Integer(@Lt.F1) - Integer(Lt)]));
Lt.Free;
end;
{ TTest }
procedure TTest.Test;
begin
end;
end.
标签:end,Delphi,类型定义,Lt,实例,Integer,type,TTest,procedure From: https://blog.51cto.com/u_16076050/6195842