Slimelite BBS

EOF

Back to R25C

From Simon Avery · 1996-04-05 23:58 · #75231 in R25C

In reply to EOF by Alistair Green

Ullo Alistair! 

Alistair Green wrote to All about EOF 

 AG>  I have recently been writing a program that involves reading ascii
 AG> files  one  byte at a time. This is fine until I reach a section of
 AG> the code in the  file  that is recognised as the EOF, even though it
 AG> is not the end of the file.  The  program then doesn't see any more
 AG> of the file. I was wondering if anyone  knows  of a way to get round
 AG> this problem. Any help would be much appreciated. 

Depends how you open the file, really. A little bit of code would be handy.

One method that springs to mind is to use the feof macro (if opened
as a pointer)


Simon Avery     savery@zynet.net 

... While there's life, there's hope.          Cicero (43 BC)
<-- Tag-O-Matic V.10 (29035 Taglines) [Quoted: 60%] 
--- Terminate 3.00/Pro
 * Origin: Tag-O-Matic - New Version Available Soon! (2:255/20.1)