88  Pascal User Manual  Rewrite (F)  initiates generation (writing) of the file  F.  The  current value of  is  replaced with the empty file.  Eo f (F)  become~  true, and a new file may be written.  Get (F)  advances the file t(1 the next component and assigns the  value of this component to the buffer variable Fi.  If  no  next component eXIsts, then eof (F)  becomes true, and  Fibecomes undefined. The effect of Get (F)  is an error  if eof(F) is true pfl or to its execution or if F  is being  generated.  Put (F)  appends the value of the buffer variable Fi to the file  F. The effect is an error unless prior to execution the  predicate eof (F)  ii, true. eof (F)  remains true, and Fi  becomes undefineG, Put (F)  is an error if F  is being  inspected.  In  principle,  all  the  operations  Ilf  sequential-file  generation  and  inspection can be expressed entire  I y  in terms of the four primitive file  operators and the predicate eof. In  practice, it is  often natural to  combine the operation of  advancin,~~  the file position with the access to  the buffer variable. We therefore introduce the two procedures Read  and Write as follows:  Read and Write are in fact special procedures extended to accept  a variable number of actual parameters (VI ... Vn  are variables and  EI ... En  are expressions):  Read (F, VI, ... , Vn)  is equiv,dent to the statement  begin Read(F,V  ); ... ;Read(F,Vn)  end  Read (F,  X)  (for X,  a variable) is equivalent to  begin  X  • - Fi;  Get  (F)  end  Write (F, E)  (for E,  an expre "sinn) is equivalent to  begin  Fi:= E;  Put  end 