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

Enum Constructor

 
Amit Batra
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The result is shown as a 'compilation fail' because a enum constructor that takes a string must be supplied. How can I get this to compile?
 
Stary Kapec
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Amit Batra
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a bunch!
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to see "bright" and "dark" when you print Turn.ON and Turn.OFF respectively, then you can add (to Jasiek's code):
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic