Help with reading file... 
Author Message
 Help with reading file...

I need to read lines of text from a file to something (array, record).  Should
I use an array?  And how do I do that.  Is there a better way?  Thanks.

Each individual line of text is in the variable. (or each character but thats
TOO big).

Thanks again.



Sun, 30 Mar 2003 08:36:51 GMT  
 Help with reading file...
On 11 Oct 2000 00:36:51 GMT, TPJr11 sez:

Quote:
>I need to read lines of text from a file to something (array, record).  Should
>I use an array?  And how do I do that.  Is there a better way?  Thanks.

>Each individual line of text is in the variable. (or each character but thats
>TOO big).

You haven't turned in that encryption program yet?  You're making this
MUCH harder than it needs to be.  You can either use read() to read in
one character at a time, process it, and write it to the output file,
or you can use readln() to read a line into a string, process all
characters in that string, write them, and then move on to the next
line.  No need to store the whole input file in memory before writing
it out again!

Peter B. Steiger
Cheyenne, WY
----
If you reply by email, send it to pbs at com dot
canada (or vice-versa).  All adverti{*filter*}ts will be
returned to your postmaster, eh!



Sun, 30 Mar 2003 13:04:48 GMT  
 Help with reading file...
OHHH Now I get it.  Thanks,  I know somehow I am having a brain fart.  Thanks
again


Sun, 30 Mar 2003 03:00:00 GMT  
 Help with reading file...


Quote:
> I need to read lines of text from a file to something (array,
record).  Should
> I use an array?  And how do I do that.  Is there a better way?

Thanks.

Have you even opened your textbook yet?  Or did you think you'd get a
fully-formed program from your postings?

Open your textbook and TRY.  You'll be surprised what you learn just by
trying things out.
*Walt*
--
Secret "Apple Jacks" cereal eater.
I eat them because I like them.

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 06 Apr 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help with reading file

2. help please in reading .dat files

3. DBF file is read only! Can DeskTop Help

4. HELP: Reading/Converting MS Access 1.1 files

5. HELP : Reading EXCEL file by Turbo Pascal

6. Database file reading - BIG HELP

7. Please help with Text File reading...

8. help with reading data from file

9. Help: Alphabetizing and File Reading :)

10. Please help read/write text files

11. Read and write COBOL Index file : Please Help !

12. HELP: Reading from files

 

 
Powered by phpBB® Forum Software