Using STRTRAN() to Add Carriage Returns to ASCII FileID: Q117219 2.50b 2.50c 3.00b MACINTOSH
SUMMARYIn FoxPro for Macintosh, the COPY TO TYPE DELIMITED command creates a delimited ASCII file, with each record terminated by a linefeed only. Some programs require a carriage return as the record terminator. If the ASCII file is placed in a memo field with APPEND MEMO, the STRTRAN() function can be used to replace the linefeed character with a carriage return character. COPY MEMO can then be used to create a new file with carriage returns.
MORE INFORMATIONThe following code illustrates the use of STRTRAN() to add carriage return characters.
Open both files in Microsoft Word. TEST.TXT contains a box character at the
end of each record. TEST2.TXT starts a new line where the box characters
used to be in TEST.TXT.
CHR(10) is the ASCII code for the linefeed character and CHR(13) is the ASCII character for the carriage return. If both the carriage return and the linefeed character are necessary use the following REPLACE command instead.
For information about using low-level file commands to export data to a
delimited ASCII file, please see the following article in the Microsoft
Knowledge Base:
Additional reference words: VFoxMac 3.00b FoxMac 2.50b 2.50c line feed hard
return soft
CR/LF text
KBCategory:
KBSubcategory:
|
Last Reviewed: May 21, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |