content_image/790760.jpg content_image/790759.jpg
<img src='content_image/790760.jpg'>

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. 

<img src='content_image/790759.jpg'>

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. 

