A variable or expression containing character data.
Returns the number of bytes written to the file.
Writes a string to file with a trailing CR-LF.
The .WRITE_LINE() method writes a line of text data ( Text_Line ) to the location of the current file pointer in an open file referenced by the file object pointer. The CR (Carriage Return) and LF (Line Feed) codes are appended to the end of the output.
This script retrieves the names of customers from the customer table and writes them to an output file.
dim tbl as P tbl = table.open("c:\a5\a_sports\customer.dbf") file_pointer = file.create("c:\a5\output.txt", FILE_RW_EXCLUSIVE) tbl.fetch_first() while .NOT. tbl.fetch_eof() file_pointer.write_line(tbl.first_name - " " + tbl.last_name) tbl.fetch_next() end while file_pointer.flush() file_pointer.close()