retrieving txt file contents line by line 
Author Message
 retrieving txt file contents line by line

Hi,
i wondered if anyone in here knows how to access the contents of a text file
line by line randomly, that is, the program should be able to retrieve a
random line from the text file and display it to the user.

Thank you very much.
Please reply me at:



Sun, 12 Aug 2001 03:00:00 GMT  
 retrieving txt file contents line by line
You can use the Line Input # command. To get the randomness, you would have
to do a random number of these line inputs and take the result from the last
one (ie, I think you have to open the file for input to use that command
whic himplies that the data can only be read sequentially)

Quote:

>Hi,
>i wondered if anyone in here knows how to access the contents of a text
file
>line by line randomly, that is, the program should be able to retrieve a
>random line from the text file and display it to the user.

>Thank you very much.
>Please reply me at:




Mon, 13 Aug 2001 03:00:00 GMT  
 retrieving txt file contents line by line
set the file to be read as a type structure. dim  a variable of type ( file
structure) . dont forget to add a 2 byte field at the end of the file structure
to account for the cr lf. then u can use the get and put functions for random
read and write


Thu, 16 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. retrieving txt file contents line by line

2. Newbie: creating a fixed-line-length file from a variable-line-length file

3. Help Removing Lines From TXT Files.

4. import txt files in Access fails to read last line

5. Assign lines from txt file to a variable

6. delteted a line in a txt file when i found a caractar

7. Deleting Blank lines out of Txt File

8. saving multiple lines of text to a .txt file

9. Display the line details of the file contents

10. iterate through a file line-by-line

11. Reading from a file line for line

12. Help : Reading files line by line !

 

 
Powered by phpBB® Forum Software