title: What do square brackets arround an enum mean? [enum_value]
body: <p>I'm currently wrapping my head around <em>proper</em> state machines, and I've found this article which seemed to be exactly what I've been searching for:
  <a href="https://aticleworld.com/state-machine-using-c/" rel="nofollow noreferrer">https://aticleworld.com/state-machine-using-c/</a>
  In the process of understanding table of the table based state machine I've stumbled over this piece of code which in my opinion is quite hard to read.</p>
  
  <p>So this is as far as I can come:</p>
  
  <ul>
  <li><p>eSystemState is a typedefed enum which indicates the current state.</p></li>
  <li><p>eSystemEvent is a typedefed enum which indicates the current event.</p></li>
  <li><p>pfEventHandler is a typedefed function pointer returning eSystemState.</p></li>
  <li><p>afEventHandler is a typedefed, two dimensional array (limited by "last_State" and "last_Event") of function pointers returning eSystemState.</p></li>
  </ul>
  
  <p>Next up are some event handlers for each type of event.
  Then beginning of main, some initialization and there it comes.</p>
  
  <p>The previously defined type afEventHandler gets filled with content, but the operations which are used there are a big mystery to me.</p>
  
  <p>I know that for every curly brackets a new 'row' gets filled, but what do the square brackets around the enums mean, and why can one apparently assign a value to whatever comes out of this?</p>
  
  <p>I know that enums are essentially numbers, and I suspect it is some (to me) super obscure way to address a specific element in an array.</p>
  
  <p>Am I wrong?</p>
  
  <pre><code> // Table to define valid states and event of finite state machine
   static afEventHandler StateMachine = {
   [Idle_State] ={[Card_Insert_Event]= InsertCardHandler },
   [Card_Inserted_State] ={[Pin_Enter_Event] = EnterPinHandler },
   [Pin_Eentered_State] ={[Option_Selection_Event] = OptionSelectionHandler},
   [Option_Selected_State] ={[Amount_Enter_Event] = EnterAmountHandler},
   [Amount_Entered_State] ={[Amount_Dispatch_Event] = AmountDispatchHandler}, 
   };
  </code></pre>