How do I use BLOCK READ / BLOCK WRITE

Hello Chris!

 CL> @RFC.Gate: Wed, 31 Jan 96 22:53:56

 CL> From: l...@netshop.net (Chris Lee)

 CL> Hi I need a faster way to read and write to files than textfile. I do
 CL> not know how to use BLOCK READ or BLOCK WRITE.

Use the online help, there' usually quite a good example to commands.
var
  F:FILE;
  buffer:array[1..4096]of char;
  br:word;
..
assign(F,'c:\autoexec.bat');
reset(F,1);
blockread(F,buffer,sizeof(buffer),br);
close(F);
..
br contains # of chars read, If file is larger than buffersize then br is =
buffersize.
Buffer contains at least first part of file.
filepointer i always at the next part to read or at file end, ie first i it at
the beginning then it is after the block just read.
DOSERROR will be set nonzero if an error occours.

For more help, inside the IDE editor, just write BLOCKREAD position the cursor
on top of the word and press CTRL+F1.

Regards
Mikkel Breiler Cosysop Renoz BBS, Vinyl/Intuition