Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!hao!husc6!cmcl2!brl-adm!adm!RMRichardson.PA@Xerox.COM From: RMRichardson.PA@Xerox.COM Newsgroups: comp.lang.c Subject: Re: NewLine, LineFeed (was Re: Distinguished pointers (was Re: Message-ID: <8944@brl-adm.ARPA> Date: Fri, 21-Aug-87 22:11:51 EDT Article-I.D.: brl-adm.8944 Posted: Fri Aug 21 22:11:51 1987 Date-Received: Sun, 23-Aug-87 11:05:43 EDT Sender: news@brl-adm.ARPA Lines: 39 > There is no "new line" character in ASCII. UNIX uses "line feed" as the new > line character. OS/9 uses "carriage return". I'd say the 'C' language itself > is suffering from parochialism here. Wellllll, ... maybe, maybe not. From "USA Standard Code for Informations Interchange," United States of America Standards Institute (Approved October 10, 1968) (USAS X3.4-1968), pg 8: -------- 5. Definitions [ ... ] 5.1 Control Characters [ ... ] LF (Line Feed): A format effector which controls the movement of the printing position to the next print- ing line. (Applicable also to display devices.) Where ap- propriate, this character may have the meaning "New Line" (NL), a format effector which controls the move- ment of the printing point to the first printing position on the next print line. Use of this convention requires agreement between sender and recipient of data. -------- So the idea of New Line has been around for some time now and NL == LF is a standard convention. Would anyone like to quote from a later version of the standard? (Is there one?) From reading K&R, I get the implication: if you use C, you agree to this convention (at least within the C code). If the operating system does not agree to the convention, then, as Guy points out, the I/O routines must do the translations, e.g. PC/MS DOS which uses for a new line. Rich