help with control characters 
Author Message
 help with control characters

1. Learn how to post to more than one NG at a time. Very rude to make us
read the same damn message (at least) three times.

2. When "rewriting" (see #3) with PRINT#, use a semicolon after the PRINT#
statement. (You didn't show your code, a major faux pas when asking for help
with a problem like this, but five bucks says this is your problem).

3. Note you can't really "rewrite" *records*. You have to rewrite the entire
*file*. Build your output thus:
  FOR eachInputRecord.
      X = (actualstringData) + (record terminator, either CR or LF, or
anything else for that matter)
      PRINT #hNewFile, X;   ' <<< note trailing semicolon

4. As an option, you can use BINARY access to write the new file. No need to
worry about record terminators being used when the file is OPEN FOR BINARY.

Michael Mattias
Tal Systems, Inc.
Racine WI

> Hello,

> I'm trying to read a file the has string records(fixed length) separated
> a carriage return character (decimal 13) and a line feed character
> 10).  I need to rewrite the file so that it has the line feeds removed
> (keeping only the carriage return as a separator).  Trouble is, if I take
> out both of the control characters, the file is written properly.  But if
> remove one or the other, which is what I need to do, Basic seems to put in
> the missing control character so I once again have the CR/LF combination.
> Can anyone explain this and how to produce the desired filtered file?
> you so much for any help.

Wed, 06 Jul 2005 03:25:13 GMT  
 [ 1 post ] 

 Relevant Pages 

1. HELP with control characters

2. Need help with regexp and control characters

3. Building a string, character-by-character (HELP!)

4. TextEdit - How to control character input

5. Function to escape xml control characters in a string

6. XPRNT Carriage Control Characters

7. removing control characters

8. How do you send special control characters to a printer in clarion5

9. How do I send control characters to a Receipt Printer in windows

10. Control characters for Epson Stylus printers.

11. Sending Control characters to printer port

12. Printer control characters


Powered by phpBB® Forum Software