noble@icsia3.ICSI.Berkeley.EDU (Brian Noble) (04/25/91)
Howdy! I have the following global array that is accessed by several source modules... double myArray[MAX1][MAX2]; The Question: what is the least computationally expensive way to declare this array as an external variable, so when I access an element in the array the complier knows the row length and (cheaply) calculates the correct offset into the array. my first intuition is... (1) define the following type: typedef myArrayT[MAX1][MAX2]; (2) declare the array to be: myArrayT myArray; (3) and declare the external reference as extern myArrayT myArray; Will this work? Is there a better way? Please respond via email as I don't have time to keep up with comp.lang.c. If there are a sufficient number of 'boy, I'd really like to know that too' I'll summarrize to the net. Brian Noble noble@tenet.berkeley.edu