KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: A different way to append content to a file
PRODUCT: 4D Pack | VERSION: | PLATFORM: Win
Published On: November 22, 2002
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Compatibility: 6.7.x and 6.8.x

You can use the command AP FPRINT to append contents to a file created with 4D. This command is strictly for windows because it uses ANSI C command.

Here is a simple procedure that will create a simple text document:

$doc:=Create document("")
If (OK=1)
CLOSE DOCUMENT($doc)
port:=AP fopen (document;0)
AP FPRINT (port;"hello world")
AP FCLOSE (port)
End if