I use something like var a: array of byte; setlength(a,TheSize); blockwrite(afile,a[0],TheSize);
Of course, if it is possible that TheSize=0, I have to write "if TheSize>0 then blockwrite(...);" Is this the intended way? (Ok, that's not a big overhead, but it seems strange to me.) What is the intended way (if it's somewhat different)? _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal