From: John Cowan (cowan@mercury.ccil.org)
Date: Fri Oct 24 2003 - 05:08:43 CST
jon@hackcraft.net scripsit:
> However, under closer examination we are both wrong. '\u000A' is not allowed!
Fair enough. Banning low-valued \u and \U escapes allows \u and \U
removal to be done at a very low level. Java in effect has the same
rule: it is legal to say '\u000A', but that is equivalent to '
' rather than '\n'; i.e. it is a syntax error, since you can't have
a physical newline between single quotes (JLS 3.10.4).
> Still, I stand by saying that \n is defined in C++ as LF and \r as CR, because
> that's sitting in front of me in black and white.
Yes, true. But that does *not* mean that (int)'\n' can be counted on to
be 10, any more than (int)'a' can be counted on to be 65. \n corresponds
to the LF in the source character set, whatever that is. On Mac Classic,
\n is 15, and on EBCDIC systems, it's also 15, though for a different
reason.
-- We call nothing profound jcowan@reutershealth.com that is not wittily expressed. John Cowan --Northrop Frye (improved) http://www.reutershealth.com
This archive was generated by hypermail 2.1.5 : Thu Jan 18 2007 - 15:54:24 CST