Solved

Untyped files in Delphi

Posted on 1998-10-28
2
354 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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help on project with Soap 10 57
Dev express lookupcombo 3 34
Drag & Drop... Data from one grid to another 2 40
Tvertscrollbox like a whatsapp layout delete messages 1 23
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

789 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