View Single Post
  #9  
Old 05-05-2007, 04:06 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
enumerators auto-assign integers to the variable. ( I don't think you should use them inside events, or functions. I don't in C++, at least. )

PHP Code:
enum MENU
{
  
FILE,// 0
  
NEW, // 1
  
END  // 2
};

function 
onCreated() {
  echo(
"File: " MENU.FILE); // Output: File: 0
  
echo("New: " MENU.NEW);   // Output: New: 1
  
echo("End: " MENU.END);   // Output: End: 2

It should work that way.
__________________
- Zidane / Zidaya
Reply With Quote