title: array definition and initiation in promela
body: <blockquote>
  <pre><code>1 #define NUM_PHIL 4
  2 
  3 byte chopstick[4];
  4 chopstick[0] = 1;
  5 chopstick[1] = 1;
  6 chopstick[2] = 1;
  7 chopstick[3] = 1;
  8 
  9 proctype phil(int id) {
  10    do 
  11      ::printf("Philosopher %d is thinking\n",id);
  12      /* ... */
  13      printf("Philosopher %d is eating with forks %d and %d\n",id,id,(id+1)%4);
  14      /* ... */
  15    od
  16    }
  16a
  17 init {
  18    int i = 0; 
  19    do 
  20    :: i &gt;= NUM_PHIL -&gt; break
  21    :: else -&gt; run phil(i); 
  22               i++ 
  23    od 
  24    }
  </code></pre>
  </blockquote>
  
  <p>the codes above send an error "syntax error saw 'an identifier' near 'chopstick'"
  how can i define and initialize array as a global variable outside the prototype P()
  thanks for helping</p>