title: Array format for #define (C preprocessor)
body: <p>Probably a naïve question - I used to program 20 years ago and haven't coded much since. My memory of how the <code>C preprocessor</code> works has atrophied significantly since then...</p>
  
  <p>I am writing a very simple <code>C</code> program and I am trying to declare a few static global arrays, but the size of the <code>arrays</code> would be dependent (on a non-trivial way) on a <code>MODE</code> variable. Something like the simplified example below. </p>
  
  <p>Two quick points: I know I could just size the <code>arrays</code> according to the largest size needed by any <code>MODE</code>, but I don't want to that because (unlike in the simplified example below) sometimes a handful of these dimensions are going to be extremely large while others are tiny.</p>
  
  <p>Also, I want to use statically defined global arrays - rather than dynamically allocate them at runtime. I want the compiler to have the sizes at compile time.</p>
  
  <pre><code>//** Simplified example of what I'd like to do **//    
  #define SIZE_LIST_1[5] = {2, 7, 23, 33, 12, 76}  // I don't think this is valid syntax 
  #define SIZE_LIST_2[5] = {11, 65, 222, 112, 444}
  
  #define MODE 4
  #define S1 SIZE_LIST_1[MODE]
  #define S2 SIZE_LIST_2[MODE] 
  
  int a[S1], b[S2];
  </code></pre>