Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Managing data file for a lucky draw
Let's say I'm going to handle a lot of words which is stored in a plain text file.
Be sure that each line has only 1 word & there are more than hundred thousands of lines in total.
I have to write a program to random a word and store it in a STRING var.
Here is an example of what the content of the text file looks like:
Use FILE instead of TEXT because it is time consuming in reading STRING from the TEXT file.
[code]name_list : text ; (*I don't want text*)
name_list : file ; (*data file instead*)[/code]