Question about reading files 
Author Message
 Question about reading files

I have an ST/V 16-bit app which reads (potentially very large) files over
and over and displays their contents graphically.  I read the file with
code like...

        line := fileStream nextLine.

and then break the line up into fields (the records are tab separated).  I've
got the breakup process pretty efficient by storing indexes to the beginning
and end of each field with a method that returns a string extracted from
"line" using the indexes.

Is there a way to read from a stream into an existing string so that I don't
have to create "line" each time?  Of course I don't know that creating the
String "line" is taking all that much time, but when I compare just reading
the file (line := fileStream nextLine) vs just copying the file using DOS
there is a big difference.  So I assume one of the problems is the allocation
of "line."

If you wish to reply via email, you need to use the address below.

Thanks for your help.


1511 East Olive Street
Shorewood, WI   53211   414-332-1153

Mon, 23 Mar 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Newbie question:read file speed

2. question: reading an empty file results in nil

3. new question in how can i read data from file line by line

4. implementation question about writing and reading from files

5. Reading data from file question.

6. read binary file question

7. File read question

8. File write/read question

9. Simple File reading question?

10. Prolog newbie question: how to read from file?

11. question about read *.ini file and RS232 serial device

12. Question to read/write a file !!!


Powered by phpBB® Forum Software