hii...i need some help in doing searching in text file.here are my problem...
i have to make a search procedure for my assignment:
i've only have to use sequential file/ text file, i cannot use arrays or even records.
A program is required to search for a requested item from a sequential file. the program must locate the item and report how many records the program searched through to locate the item.
each record is made up of the following fields
Vehicle make
vehicle model
year of manufacture
registration number
the program must
*Let user select which field to search for
*Let the user enter the value to search for
i have succesfuly made the program, but in my seach fields i cannotkeep seaching if i have the same input
here is my search procedure (say i want to search in the vehicle make fields)
found:=false
write('Enter The vihecle make ?');
readln(make);
repeat
readln(myfilename,make);
readln(..........,model);
r.................,year);
r.................,number);
found := search = make
until eof(myfilename) or found;
if found ........
in the actual file
there are two toyota
with my seach above i've only able to show the first one. not the second one.... i need some help here.....
how can i make it to seach the whole file then afterward display the result
if some one can help me i would like to ask you to be more specific and clear.... i'm really new with this things. Providing some example would be great full ....
thank you very much for your time....!!!