From: Knute Johnson on
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/
From: dimakura on
On Feb 20, 9:44 am, Gordon Beaton <n...(a)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.

First  |  Prev  | 
Pages: 1 2 3
Prev: Axis2 vs. multirefs
Next: MYFaces in tomcat 5.x