| ??? 09/27/02 09:53 Read: times |
#29761 - RE: Removing a Cr Linefeed from data strea |
My understanding is this:
'n' and 'r' are single character escapes representing linefeed (LF) and carriage return (CR). In the UNIX world the convention for a stream opened in text mode is that a line is terminated with a linefeed (LF), in the DOS world a line is terminated with a carriage return linefeed (CRLF) sequence. If the DOS convention is adopted then writing to a text mode stream (which can be the screen, a file, a COM port etc) will cause a linefeed character to be translated to a CRLF sequence at the point of output. printf("n"); will therefore cause a CRLF sequence to be emitted, however sprintf(buff,"n"); will result in a single linefeed character being stored in buff[]. Keil does it this way - the putchar() function translates LF into a CRLF sequence at the point of output to SBUF. |
| Topic | Author | Date |
| Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 | |
| RE: Removing a Cr Linefeed from data strea | 01/01/70 00:00 |



