Untyped files in Delphi

Why can't I append to an untyped file ??
Is it ilegal ??  perhaps I can only append to a textfile ??
JebAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jecksomConnect With a Mentor Commented:
Hi Jeb!

just seek to end of file:

procedure TForm1.Button1Click(Sender: TObject);
var f:file;
re:string;
begin
re:=#13+#10+'rem appended'+#13+#10;
assignfile(f,'c:\autoexec.bat');reset(f,1);
seek(f,sizeof(f));
blockwrite(f,re[1],length(re)-1);
closefile(f);
end;

Jecksom

0
 
jecksomCommented:
PS : there is always more advanced variants (sharing checking,file exist? , etc).

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.