File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

chars

 
khella smith
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i need some help i am getting confused with this char initialization how come u can have this '\u000b','\u0a00','\uface'etc but u can't have '\u000a'?
i don't get it pls explain to me
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at the Unicode Chart you will see that:
\u000A is a linefeed
\u000B is a vertical tab
\u000C is a form feed (page separator)
\u000D is a carriage return
etc.
Then you need to remember that when handling your code the compiler
-first converts all the typed characters to unicode,
-second DOES all the unicode commands
-third starts looking at your code to begin compiling it.
Well if you have a \u000a in the middle of a line of code the linefeed is going to happen before any compiling occurs. The effect is that the line will be split into 2 logical lines as far as the compiler is concerned and you will get syntax errors for not completing whatever command that you were doing.
The other unicode expressions are just characters that are not print commands and therefore do not muddle up your syntax.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic