Delphi 记录类型- 结构指针
转自:万一老师的 Delphi 博客 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class (TForm) Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); end ; var Form1: TForm1; implementation {$R *.dfm} type TRec = record {定义结构 TRec} name: string [ 12 ]; age: Word; end ; TPRec = ^TRec; {定义 TRec 结构的指针类型 TPRec} var Rec: TRec; {声明结构变量} PRec1,PRec2: