Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Untyped files in Delphi

Posted on 1998-10-28
2
Medium Priority
?
360 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 30 total points
ID: 1344735
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
ID: 1344736
PS : there is always more advanced variants (sharing checking,file exist? , etc).

0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

971 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