Solved

Untyped files in Delphi

Posted on 1998-10-28
2
348 Views
Last Modified: 2011-08-18
Why can't I append to an untyped file ??
Is it ilegal ??  perhaps I can only append to a textfile ??
0
Comment
Question by:Jeb
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
jecksom earned 10 total points
Comment Utility
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
 
LVL 1

Expert Comment

by:jecksom
Comment Utility
PS : there is always more advanced variants (sharing checking,file exist? , etc).

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now