|

_________________________________________________________________________________________

___________________
Welcome
to our website
{$U+}
{$R+}
program students(input,output,infile,outfile);
{$Ilab3gbl.pas}
{********************************************************************}
procedure echoprint(var infile,outfile : text);
var people : studentype;
begin { Echoprint }
{$i-}
reset(infile);
rewrite(outfile);
{$i+}
while not eof(infile) do
begin
readln(infile,people);
writeln(outfile,people:42)
end
end; { Echoprint }
{********************************************************************}
procedure scrnhold;
var i : integer;
begin
writeln;
writeln('Press enter to continue . .');
readln
end;
{********************************************************************}
procedure chooseprint(var outfile : text);
var ch : char;
begin { Choose }
clrscr;
writeln('Do you wish to print(Y/N)?');
readln(ch);
ch := upcase(ch);
clrscr;
case ch of
'Y' : begin
{$i-}
assign(outfile,'prn');
{$i+}
end;
'N' : begin
{$i-}
assign(outfile,'con');
{$i+}
end
end { Case }
end; { Choose }
{********************************************************************}
procedure select(var nfl,outfile : text; var gate : boolean;
var person : infotype;
var list : pointertype);
var ch : char;
begin
read(ch);
ch := upcase(ch);
case ch of
'A' : begin
clrscr;
chooseprint(outfile);
echoprint(infile,outfile);
scrnhold
end;
'B' : begin
clrscr;
chooseprint(outfile);
drivelist(infile,outfile,person,numlines,list);
scrnhold
end;
'X' : begin
clrscr;
writeln('Exit.');
gate := true
end
end; { CASE }
end; { Select }
{********************************************************************}
procedure menu;
var
i,j : integer;
begin
clrscr;
writeln(' Lab3.pas');
writeln;
writeln;
writeln('----------------------':47);
writeln('| Linked Lists |':47);
writeln('----------------------':47);
writeln;
writeln;
writeln('A: READ AND ECHOPRINT ':47);
writeln;
writeln('B: PRINT ALPHABETIZED LIST':51);
writeln;
writeln('X: EXIT':32);
for i := 1 to 9 do
writeln;
write('Choose an option . .');
writeln;
end; { Menu }
{********************************************************************}
begin
assign(infile,'lab3.dat');
assign(outfile,'con');
flag := false;
while not flag do
begin
menu;
select(infile,outfile,flag,person,list)
end;
close(outfile);
close(infile)
end.
DATAFILE:
LAB3.DAT
1235 Sam Smith 2.75 CS
CS208 SOC100 EH205
3251 Mary Blake 3.32 MA
MA251 MA 244
8724 Bob Williams 1.99 BYS
BYS113 MA 154 COM113 EH 205
7765 Christine White 3.45 CS
CS 308 CS209
2395 Richard Smith 3.87 PY
PY100 EH102 HY102
1818 Debbie Blake 3.1 CS
CS214 CS208 MA244 HY102
4905 Dick Brown 2.75 CH
CH121 CH125 MA154
3875 Sue Jones 2.50 CS
CS214
7788 Chris Christen 2.15 MA
CS108 MA154 EH205
2947 Mike Smith 3.16 CH
PY100 EH205 FH201
2325 Lane Mosley 3.25 PY
CH121 CH124
4128 Missy Valves 2.78 BYS
MA244 MA251 CS309
_________________________________________________________________________________________
About
Us
Content
provided by VirtualeCorporation
GeminiSoftwareSystems
GeminiMalls GeminiMagazine
TradeLinks
VirtualeCatalog
VirtualeCorporation
VirtualeDirectory
VirtualeJobs VirtualeMedia
VirtualeOffices
_______________________________________________________________________________________
Give to Charities Click
Here!
Michael J. Fox Parkinson's Website Click
Here!
__________________________________________
Software
including hosting, websites, graphics, development, office, security..Click
Here!
________________________________________________________________________________________

Buy Online at Autodesk
"Internet Security Systems' BlackICE Protection Products"
Need to create a business plan now? Get OfficeReady Business Plans
Kaspersky Anti-Virus Products
Free Shipping when you spend $100 on Macromedia.com
Convert paper and PDF into Documents you can edit, share and archive - Buy OmniPage Pro from ScanSoft.
Broderbund Bargain Bin - All Titles Under $9.99! Plus FREE shipping with orders over $20!
_____________________

|