当前在线人数11647
首页 - 分类讨论区 - 电脑网络 - 葵花宝典版 -阅读文章
未名交友
[更多]
[更多]
文章阅读:Re: expression in Java
[同主题阅读] [版面: 葵花宝典] [作者:deepbeep] , 2005年03月17日21:57:30
deepbeep
进入未名形象秀
我的博客
[上篇] [下篇] [同主题上篇] [同主题下篇]

发信人: deepbeep (咪咪豆), 信区: Programming
标  题: Re: expression in Java
发信站: Unknown Space - 未名空间 (Thu Mar 17 22:00:11 2005), 转信

http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#100960

Because Unicode escapes are processed very early, it is not correct to
write '\u000a' for a character literal whose value is linefeed (LF); the
Unicode escape \u000a is transformed into an actual linefeed in translation
step 1 (§3.3) and the linefeed becomes a LineTerminator in step 2 (§3.4),
and so the character literal is not valid in step 3. Instead, one should
use the escape sequence '\n' (§3.10.6). Similarly, it is not correct to
write '\u000d' for a character literal whose value is carriage return (CR).
Instead, use '\r'.

【 在 scififi (What are you looking at?) 的大作中提到: 】 : String b = "\u000A"; is syntax error.
: String b = "\u0009"; is right,
: String b = "\u001A"; is right too.
: why?
: How to input "\u000A" into a variable?
: thx


--
※ 来源:.Unknown Space - 未名空间 mitbbs.com.[FROM: 69.22.]

[上篇] [下篇] [同主题上篇] [同主题下篇]
[转寄] [转贴] [回信给作者] [修改文章] [删除文章] [同主题阅读] [从此处展开] [返回版面] [快速返回] [收藏] [举报]
 
回复文章
标题:
内 容:

未名交友
将您的链接放在这儿

友情链接


 

Site Map - Contact Us - Terms and Conditions - Privacy Policy

版权所有,未名空间(mitbbs.com),since 1996