• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading from a textfile

 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a textfile in which there are more than 100 lines.Now,everytime I want to access this file
from a particular line to another line.How can I do this.
For ex--
Hello
Bye
SeeYu
First time I want to access line1,next time line2 and line3(from a function)
thanks
 
Jax Laakso
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried using a String Array?
example:

That way you can access them as you would an array, using the address of the line (allTheLines[100]) to access the line you're looking for.
Jax
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!