Replacing Carriage Return & Line Feeds with Other CharactersID: Q128522 2.60a 3.00 WINDOWS 3.00 The information in this article applies to:
SUMMARYThis article shows by example how to have a program process a file to replace carriage returns and line feeds with a double dollar sign. You can modify the code to use a character other than the double dollar sign by replacing the double dollar sign ASCII value (CHR(36)) with some other appropriate ASCII value. The code in this article also demonstrates how to use low level file functions.
MORE INFORMATIONThe following program takes two parameters:
Sample CodePARAMETER file1,file2 PRIVATE fhandle_in,fhandle_out,fisize,inchar fhandle_in=FOPEN(file1,2) ENDIF
How to Use the Sample CodeTo demonstrate the code example, copy it into a new program file, and save it as TEST.PRG. Then from the Command Window, type:
NOTE: Please note that file names passed to a program as parameters must be
enclosed by quotation marks.
Here C:\TEST.TXT is the file that needs carriage returns and line feeds removed, and C:\TEST1.TXT is the name of the new file. Additional reference words: VFoxWin 3.00 FoxWin 2.60a KBCategory: KBSubcategory: FxprgGeneral
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |