ex52.pp 343 B

1234567891011121314151617
  1. Program Example52;
  2. { Program to demonstrate the Rewrite function. }
  3. Var F : File;
  4. I : longint;
  5. begin
  6. Assign (F,'Test.tmp');
  7. { Create the file. Recordsize is 4 }
  8. Rewrite (F,Sizeof(I));
  9. For I:=1 to 10 do
  10. BlockWrite (F,I,1);
  11. close (f);
  12. { F contains now a binary representation of
  13. 10 longints going from 1 to 10 }
  14. end.