Topic: \n


Author: ron@sensor.com ("Ron Natalie")
Date: Mon, 18 Nov 2002 16:17:37 +0000 (UTC)
Raw View
"Stefan Ram" <ram@zedat.fu-berlin.de> wrote in message news:ar45ro$er314$1@fu-berlin.de...
>   In ISO/IEC 14882:1998(E), 2.13.2, Table 5 contains
>   the line "newline NL (LF) \n", describing "\n" as
>   "newline", "NL" and "LF".
>
>   ISO/IEC 14882:1998(E) 8.5.2 says:
>   "'\n' is a single character".

All correct.

>   I understand that writing '\n' to a text stream will
>   effectively insert, e.g., "\015\012" into a file if
>   "\015\012" is the line separating character sequence
>   of the environment (locale?), but was not able to
>   find this confirmed in ISO/IEC 14882:1998(E).

27.8.1.3/2  defines the stream behavior in therms of the equivelent
stdio behavior (Including the presence or absence of the binary bit).

You then can get the behavior of text vs. binary mode from 7.9.2 of
the (1990) C standard (or  7.19.2 of the 1999 C standard, they both say
the same thing).



---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]