View Single Post
  #10  
Old 05-05-2007, 05:07 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Enum is useful because it can be used in ways like this:
PHP Code:
enum key{
F9 = 122,
F10 = 123,
F11 = 124
}

function 
onKeyPressed(code, key)
{
  if (
code in {key.F9, key.F10, key.F11})
    
do_something();
} 
Reply With Quote