title: how to assign structures in C18 compiler, MPLAB (ANSI C89)
body: <p>I am trying to assign values in main program.</p>
  
  <pre><code>typedef struct PointStructure 
  {   unsigned char x;    
      unsigned char y; 
      unsigned char offset; 
      unsigned char page;
  }point;
  
  volatile far point p;
  volatile far point AryP[5];
  </code></pre>
  
  <p>The only way I could assign values to the structure p in main program is </p>
  
  <pre><code>p.x=10;
  p.y=20;
  p.offset=0;
  p.page=1;
  </code></pre>
  
  <p>This way it will take a lot of space and time for me to assign values to the arrays. Is there a better way to do this? </p>
  
  <p>Following ways did not work for me..</p>
  
  <pre><code>p = {10, 20, 0, 1};
  
  p = {.x = 10, .y=20, .offset=0, .page=1};
  </code></pre>