Thread: enum
View Single Post
  #3  
Old 05-17-2006, 04:54 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by excaliber7388
I'm not sure how Graal does it, but I think in C++ an enumeration is a word constant for numbers, in your example, follow would be 0, stay as 1, and attack as 2 and so on. But this isn't the format I've seen it in, I've never seen using mode.follow or the MODE at the front of the enumeration, so I could be very wrong XD
PHP Code:
enum MODE
{
  
IDLEWALK

... produces the following possibilities:
  • MODE.IDLE, with value 0
  • MODE.WALK, with value 1
Also.
PHP Code:
enum
{
  
IDLEWALK

... produces the following possibilities:
  • IDLE, with value 0
  • WALK, with value 1
__________________
Skyld
Reply With Quote