Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > '\u000a' and '\u000d'

Reply
Thread Tools

'\u000a' and '\u000d'

 
 
Knute Johnson
Guest
Posts: n/a
 
      02-21-2007
Chris Uppal wrote:
> Knute Johnson wrote:
>
>> char c = \u0027\u002a\u0027\u003b
>>
>> Do you know why they would process the unicode prior to determining if
>> it was part of a comment or literal first?

>
> I presume the idea is to allow the use of Unicode characters in identifiers and
> comments without making the source completely inaccessible to people using
> non-Unicode editors. Also to allow for the case where the source has to be
> manipulated by non-Unicode programs (source code control, and so on).
>
> -- chris
>


I guess you have to make the rule one way or the other and this is the
way. It does make for some really interesting traps though.

--

Knute Johnson
email s/nospam/knute/
 
Reply With Quote
 
 
 
 
dimakura
Guest
Posts: n/a
 
      02-21-2007
On Feb 20, 9:44 am, Gordon Beaton <n...@for.email> wrote:
> On 20 Feb 2007 01:22:55 -0800, dimakura wrote:
>
> > but error is

>
> > // \u000a something_else

>
> > where "something_else" is not spaces or something placed in correct
> > Java-style comment

>
> Not just comments and whitespace. It's valid if something_else is
> anything that can appear at the start of a line, including statements
> or declarations, etc, in the context of the most recent non-comment
> before this line, e.g.:
>
> public class
> // \u000a Foo {
> }
>
> /gordon
>
> --
> [ don't email me support questions or followups ]
> g o r d o n + n e w s @ b a l d e r 1 3 . s e



i agree, my formulation was not too precise.
thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM



Advertisments