
    long *datapointer;
    int ticks, stopcount;
    ...
     datapointer=(long *) malloc(stopcount*sizeof(long));
     ticks=0;
     while (ticks <=stopcount) 
          {                        /*ERROR: Put last data
                                   item off the end of the 
                                   malloc'd array while 
                                   processing a predefined
                                   amount of incoming data
                                   from a comm channel. */
          if(dataready)
               {                   /* wait for data-ready signal */
               *(datapointer + ticks) = process_data();
               ticks++;
               } 
          }

