• Post Reply Bookmark Topic Watch Topic
  • New Topic

file reading problem

 
swapnel surade
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to do some I/O operation using LineNumberReader class.

In snippet is the portion of the file which i want to operate on.
Here F02. is the function name and i have to count number of lines present in the function.
F02-FN. this is the end of the function.
Can I go back to 417300 F02. EXIT. P000
this line if i will be at the end of the function.
Is there any other API which can be used for this operation.



thanks
 
Peter Taucher
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you 'want' to use LineNumberReader. May I ask why? What's your goal?
I 'assume' (because you didn't really tell) that you want to determine the line count of the function and then do something with it's content. Is this correct? Wouldn't it be possible to 'remember' all the lines of the functions ... or are there huge (several thousands of lines) functions to be expected?
 
swapnel surade
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want the line number thats why i'm using LineNumberReader. I was using BufferedReader but I can get same functionality and some add on thats why I'm using it. If any better way you know, I can change my way...

I have to operate on the functions in file(which starts from F and end with . and it is placed at fix column) thats the main concern.

there can be thousands of lines in the file
 
Peter Taucher
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
swapnel surade wrote:I have to operate on the functions in file(which starts from F and end with . and it is placed at fix column) thats the main concern.

I cannot understand your concerns. You didn't tell what you're trying to achieve. Define 'operate', TellTheDetails

Maybe you could show on this demo code:
 
swapnel surade
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to read the file and do some update the file.
I'm using LineNumberReader class. is there any other way to read file.
 
Peter Taucher
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
swapnel surade wrote:do some update

And why don't you do it then?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!