hey im lost, so was wondering if anyone would help me. Im doing a program for a DVD rental system. When it comes to searching the rentals by ID, I cant seem to make it show all the DVD's that the customer has rented not only one. I dont know if I was clear enough so here's the procedure I wrote:
procedure SEARCH_RENTAL_ID (s:string);
begin
found := false;
seek(r,0);
if (filesize(r) = 0) then
writeln(' Currently there are no entries in this file')
else begin
while not(eof(r)) and (found = false) do
begin
read(r,rr);
if (rr.ID) = s then
begin
writeln;
writeln(' ID.................',rr.ID);
writeln;
writeln(' ISBN...............',rr.ISBN);
writeln;
writeln(' Rental Type........',rr.rental_type);
writeln;
writeln(' Date Out...........',rr.date_out);
writeln;
writeln(' Date In............',rr.date_in);
found := true;
end;
end;
if found = false then
begin
textcolor(yellow+blink);
writeln;
writeln;
writeln(' *** HAS NO RENTALS YET ***');
textcolor(yellow);
end;
end;
end;
the only thing I need I suppose is a loop to display all the rentals the member has but I cant manage to do it. If anyone knows pls help me tnx