File Types  87  Figure 9.a  Syntax diagram for  FileType  Figure 9.b  Syntax diagram for  BufferVariable  The declaration of every file variable  F automatically introduces a  buffer variable,  denoted by  Ft,  of the component type.  It can be  considered as an access to the file through which one can either inspect  (read)  the  value of existing components or generate (write) new  components, and which is  automatically advanced by certain file  operations. Assignment is not  pos~ible  to entire file variables. Rather  the buffer variable is used to append components one at a time, in a  one-way (sequential) manner. The buffer variable becomes undefined  if the file is positioned past its last component.  The sequential processing, varying length, and the existence of a buffer  variable suggest that files may be associated with  secondary storage  and  peripherals.  Exactly  how  the  components  are  allocated  is  implementation-dependent, but we can assume that only some of the  components are present in primary storage at anyone time, and only the  component indicated by  Fi is directly accessible.  When the buffer variable  Ft  is moved beyond the  end of ajile  F, the  predeclared Boolean function  eof  (F)  returns the value true, otherwise  false. The basic file-handling procedures are:  Reset (F)  initiates inspection (reading) of F by placing the file at  its beginning.  If  F  is not empty, the value of the first  component of F is assigned to Fi and eo  f  (F)  becomes  false.  Variable!1- --------.j--