Mail Archives: djgpp/1996/11/30/17:05:18
John M. Aldrich wrote:
>
> Gorman Ho wrote:
> >
> > Hey guys.
> >
> > I just wanted to know how many char's a newline character ('\n') is.
> > Is it 2 (10 and 13) or just 1?
>
> Inside your C program, it's 1. In the operating system, it can be any
> of a number of things:
>
> - In DOS, it's a CRLF pair.
> - In Unix, it's just a CR.
> - In Mac, it's something else (can't remember)
>
Shame on you John. In Unix '\n' is 0x0A, a linefeed. '\r' is '0x0D',
the carriage return (CR). But you knew that..
Joe
- Raw text -