[Lazarus] Appending to a binary file
Dave Coventry
dgcoventry at gmail.com
Fri Dec 19 15:00:27 CET 2008
The file is type 'File'
var MF: File;
bffer: array [0..127] of Byte;
begin
AssignFile(MF,fname);
FileMode:=fmOpenWrite;
Reset(MF,1);
Blockwrite(MF,bffer,128);
CloseFile(MF);
end;
Do you reckon that would do it?
2008/12/19 Reenen Laurie <rlaurie at gmail.com>:
> Yes...
>
> "Seek" the end of the file, and then write to the file...
>
> I think it's FileSeek these days.
>
> (that's if you binary file is a "file of TMyRecord")
>
>
> On Fri, Dec 19, 2008 at 3:10 PM, Dave Coventry <dgcoventry at gmail.com> wrote:
>>
>> Can one do this?
>>
>> I know that you can append test to the end of Text files, but can you
>> tack on data to an existing file?
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lazarus.freepascal.org
>> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>
> --
> o__
> ,_.>/ _
> (_)_\(_)_______
> ...speed is good
> _______________
> I believe five out of four people have a problem with fractions.
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
More information about the Lazarus
mailing list