| Author |
unclosed character literal
|
Stefan Geelen
Ranch Hand
Joined: Nov 19, 2001
Posts: 49
|
|
Hi , I have following char[] array (partially reproduced: The problem is that my compiler (NetBeans) gives an ' unclosed character literal' error for the values 096 and 097, but not 100 and 101. Any idea why ? Regards
|
 |
Jimmy Die
Ranch Hand
Joined: Nov 20, 2003
Posts: 97
|
|
Hi, I don't see a comma after your 'A' in your array definition. I would check this first.
|
Jimmy Die
|
 |
Stefan Geelen
Ranch Hand
Joined: Nov 19, 2001
Posts: 49
|
|
Hi, that was just a typo error when entering the message. It is correct is my Editor . I have the impression that NetBeans is wrong here. Can someone else try this in another editor ? Stefan
|
 |
Priyaa V Kumar
Ranch Hand
Joined: Aug 12, 2004
Posts: 32
|
|
I think that you cannot have the digits 8 or 9 as part of the char that you are defining. For ex. '\107', '\777', 'A', 'E', 'Z' are valid values ... but '\108', '\901' are not.
|
 |
Jeff Bosch
Ranch Hand
Joined: Jul 30, 2003
Posts: 804
|
|
I also don't see a closing semicolon to end the statement. Plus, the format for the characters should be Unicode: To use Octal: [ October 25, 2004: Message edited by: Jeff Bosch ]
|
Give a man a fish, he'll eat for one day. <br />Teach a man to fish, he'll drink all your beer.<br /> <br />Cheers,<br /> <br />Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
|
 |
Stefan Geelen
Ranch Hand
Joined: Nov 19, 2001
Posts: 49
|
|
|
Hi, thanks for the solution.
|
 |
 |
|
|
subject: unclosed character literal
|
|
|