Language Reference Guide : System Classes : StringObject Class : AppendToFile Method
 
Share this page          
AppendToFile Method
The AppendToFile method appends the StringObject to the end of a file.
This method has the following syntax:
integer = StringObject.AppendToFile([filename = varchar(256)])
This method has the following parameter:
filename
Specifies the file name of the file to append to. The file name must be valid for the system on which the application is running. If the file does not exist, OpenROAD creates it when the method executes. If you do not specify a file name, the default value is the current value of the string object's FileHandle attribute.
The AppendToFile method does not update the StringObject's FileHandle attribute.
This method returns ER_OK, if successful. If the file name is invalid or if any other errors occur, the method returns a non-zero value and generates an error message. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.
On all platforms, when the string is written to a file, all newline (LF) characters in the file are written as MS-DOS newline (CR-LF) characters.