Help: Best way to store a series of extern variables to an array

 

Hi,

 

I need help finding out the best way to store a series of extern variables to an array. 

I need to produce the constant of each extern variable later using a loop.

  

How can I do that? 

 
cybernick:

Hi,

 

I need help finding out the best way to store a series of extern variables to an array. 

I need to produce the constant of each extern variable later using a loop.

Why ?  just use the extern variable again . . .
 
Remember each time you change pairs or time frames the EA goes through a deinit/init cycle but global variables are NOT reloaded. Never modify externs and just use them again.
extern type ev1 = ..; #define V1 0
extern type ev2 = ..; #define V2 1
                          #define V_COUNT 2
type evs[V_COUNT];
int init(){
   evs[V1] = ev1;
   evs[V2] = ev2;
Reason: