
کامل ترین پروژه های دوران ما
بیش از 50 پروژه و تمرین زبان پاسکال
برنامه های کتابخانه ای
برنامه های ساختمان داده ها
برنامه های درختی
برنامه لینک و پشته و صف
بازی XOX
پروژه کودکستان
بیش از 5 هزار خط برنامه
PROGRAM sfilep;
USES wincrt;
{define of Baby record to link list}
TYPE
recp=^BabyRec;
BabyRec=record
BabyNam:string[20];
BabyFamil:string[30];
ClasNo:longint;
adr:recp;
end;
recfile=file of BabyRec;
VAR
{define of variables}
BabyFile:recfile;
head,cur,pre,newrec:recp;
BabyRec1:BabyRec;
choice:integer;
{*********************procedure append new Baby***************}
PROCEDURE appdata;
BEGIN
clrscr;
{define of new Baby node}
new(newrec);
gotoxy(20,6);
write('enter Baby family:');readln(newrec^.BabyFamil);
gotoxy(20,8);
write('enter Baby name:');readln(newrec^.BabyNam);
gotoxy(20,10);
write('enter clas.number:');readln(newrec^.ClasNo);
{initialising of new node}
newrec^.adr:=nil;
{if list is empty}
IF head=nil THEN
head:=newrec
{before of else ";" don't put}
ELSE
begin
{tarverse of list for finding place of new
node}
{and sorting list according to reducing}
cur:=head;
while(cur<>nil)and(newrec^.ClasNo>cur^.ClasNo)do
begin
pre:=cur;
cur:=cur^.adr;
end;
{end of while}
{if list just has one node}
if cur=head then
begin
head:=newrec;
newrec^.adr:=cur;
end
{before of else ";" don't put}
else
begin
newrec^.adr:=cur;
pre^.adr:=newrec;
end;
end;
{end of else}
END;
{end of procedure}
{************************proced list***********************}
PROCEDURE list;
BEGIN
clrscr;
cur:=head;
gotoxy(5,4);
writeln('Baby clas');
gotoxy(35,4);
writeln('BabyFamil');
gotoxy(55,4);
writeln('BabyNam');
gotoxy(2,5);
writeln('______________________________________________________________');
writeln('');
{traverse of list for printing of nodes's data}
while cur<>nil do
begin
writeln(cur^.ClasNo:8,cur^.BabyFamil:30,cur^.BabyNam:20);
cur:=cur^.adr;
end;
{end of while}
gotoxy(30,23);
readln;
END;
{end of procedure}
{***************procedure of search of BabyBabyNam*********************}
PROCEDURE search_BabyNam;
50 پروژه های ناب زبان ساده پاسکال