From: Joe Wright Newsgroups: comp.os.msdos.djgpp Subject: Re: A simple question ... Date: Sat, 30 Nov 1996 16:11:08 -0500 Organization: Alpha Solutions Lines: 21 Message-ID: <32A0A2EC.4710@exis.net> References: <57pv9i$142i AT pulp DOT ucs DOT ualberta DOT ca> <32A0AFEC DOT 4E77 AT cs DOT com> Reply-To: wrightj AT exis DOT net NNTP-Posting-Host: ppp-1-1.exis.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: fighteer AT cs DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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