Append document

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


Append document (document{; type}) DocRef

ParameterTypeDescription
documentStringDocument name or
Full document pathname or
Empty string for standard file dialog box
typeStringMac OS file type (4-character string) or
Windows file extension (1 to 3-character string) or
TEXT (.TXT) document if omitted
Function resultDocRefDocument reference number

Description

The Append document command does the same as thing as Open document: it allows you to open a document on disk.

The only difference is that Append document sets the file position at the end of the document while Open document sets its at the beginning of the document.

Refer to Open document for more details about using Append document.

Example

The following example opens an existing document called Note, appends the string "and so long" and a carriage return onto the end of the document, and closes the document. If the document already contained the string "Good-bye", the document would now contain the string "Good-bye and so long", followed by a carriage return:

   C_TIME(vhDocRef) 
   vhDocRef:=Append document ("Note")  ` Open Note document 
   SEND PACKET (vhDocRef;" and so long"+Char(13))  ` Append a string 
   CLOSE DOCUMENT (vhDocRef)  ` Close the document

See Also

Create document, Open document.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next