Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; procedure formcreate (Sender: tobject); Procedure button1click (Sender: tobject); Procedure button2click (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} type pmyrec = ^ myrec; {define pmyrec as the pointer type of the myrec structure below} myrec = Record Name: String [8]; age: word; Link: pmyrec; {The structure also contains pointers of the same type, used to link other similar structures} end; var R1, R2, R3, R4: myrec; {make R1, R2, R3, and R4 an interlocking "chain". This is a simple "linked list"} procedure tform1.formcreate (Sender: tobject); begin r4.name: = 'lily'; r4.age: = 16; r4.link: = nil; r3.name: = 'zhangsan'; r3.age: = 61; r3.link: = @ R4; r2.name: = 'Qian 2'; r2.age: = 24; r2.link: = @ R3; r1.name: = 'zhao yi'; r1.age: = 42; r1.link: = @ R2; end; {now, the entire chain can be accessed through R1; but this chain is unidirectional, so it is called "unidirectional linked list"} procedure tform1.button1click (Sender: tobject); begin showmessage (r1.name ); {Zhao Yi} showmessage (r1.link ^. name); {} showmessage (r1.link ^. link ^. name); {Zhang San} showmessage (r1.link ^. link ^. link ^. name); {Li Si} end; {Reading data through the structure pointer can omit ^; so button1click can be abbreviated as:} procedure tform1.button2click (Sender: tobject); begin showmessage (r1.name ); {Zhao Yi} showmessage (r1.link. name); {} showmessage (r1.link. link. name); {Zhang San} showmessage (r1.link. link. link. name); {Li Si} end; end.