Does Eof() work properly with word documents? I was playig about with the commands a few minutes ago, and my code works perfectly with a .txt document but with a word document it just keeps on going!
i.e: It had one line in it 'jimmy' and was printing thousands of blank lines to the console, so much so that it crashed the program.
I haven't posted the code as I don't think its relevent.
Eof() In Word documents
-
Killswitch
- Enthusiast

- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
Eof() In Word documents
~I see one problem with your reasoning: the fact is thats not a chicken~
The function works properly with all types of files.
A word document does contain lots of binary data. It is no plain text format.
(for example, save an empty word page to disk, you get a 19kb file. There is
obviously no text in it, but lots of other data.)
Of course, if you just try to read that as text and print it to the console,
you get lots of empty lines.
Timo
A word document does contain lots of binary data. It is no plain text format.
(for example, save an empty word page to disk, you get a 19kb file. There is
obviously no text in it, but lots of other data.)
Of course, if you just try to read that as text and print it to the console,
you get lots of empty lines.
Timo
quidquid Latine dictum sit altum videtur
-
PolyVector
- Enthusiast

- Posts: 499
- Joined: Wed Sep 17, 2003 9:17 pm
- Location: Southern California
- Contact:
-
Killswitch
- Enthusiast

- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
Not sure that would work (if you were being serious - and if you are using readstring) because, as Freak pointed out, a word document does not only contain text.Killswitch wrote:Thank you for that extremly relevent comment,![]()
8O
I suppose I could just rename the word document to a .txt document, then I could work it out that way.
Also, maybe relax a little.
@}--`--,-- A rose by any other name ..
