WriteToFile Method
The WriteToFile method writes the string object to a file.
This method has the following syntax:
integer = StringObject.WriteToFile([filename = varchar(256)])
This method has the following parameter:
filename
Specifies the file name of the file to write to. The file name must be valid for the system on which the application is running. The default file name is the current value of the string object's FileHandle attribute.
The WriteToFile 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.
Last modified date: 06/25/2024