Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

legal identifiers

 
chinnanu chinna
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int e#;

why this one is not legal identifier
 
lalitha kaparapu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chinna,

Legal identifiers must be composed of only Unicode characters,
numbers, currency symbols, and connecting characters (like underscores).

In int e#;
You are including # which does not come under above characters..So its not legal.
 
chinnanu chinna
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
Kelvin Chenhao Lim
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please note that identifiers may not begin with a digit. But digits are allowed as the second or subsequent characters. This is primarily to avoid conflicts with numeric literals (e.g. 1L or 1.0f).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic