HP OpenVMS Systems

ask the wizard
Content starts here

C, files, and EOF philosophy

» close window

The Question is:

 
What happens when a file does not have an EOF?
How can you detect this from a c-program.
 
 


The Answer is :

 
  All files are of finite length.  All files come to an end.
 
  The End Of File (EOF) marker is of interest only on sequential files.
  It is of little consequence on the other file organizations.
 
  Without specific information on the file organization and without the
  relevent C code (and C compiler information), it is difficult to provide
  a specific answer to the question.  If you are not sure what will happen
  in a specific case, the Wizard would recommend checking the available C,
  OpenVMS, and RMS documentation, and then creating a simple test case.
 

answer written or last revised on ( 13-AUG-1998 )

» close window