private { Private declarations }
public { Public declarations }
end; var Form1: TForm1;
implementation {$R *.DFM}
type TPStudent=^TStudent; //TStudent tipiga ko'rsatkich
TStudent = record f_name:string[20]; // familiya
l_name: string[20]; // ism
next: TPStudent; // ro'yxatning navbatdagi elementi
end; var head: TPStudent; // ro'yxat boshi
// ro'yxat boshiga element qo'shish
procedure TForm1.Button1Click(Sender: TObject);
var curr: TPStudent; // ro'yxatning yangi elementi
begin new(curr); // ro'yxat elementi uchun xotiradan joy ajratish
curr^.f_name := Edit1.Text;
curr^.l_name := Edit2.Text;
// ro'yxat boshiga qo'shish
curr^.next := head;
head := curr;
// kiritish maydonini tozalash
Edit1.text:='';
Edit2.text:='';