Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/04/02 21:40
Read: times


 
#32008 - RE: KEIL: How to send a table - James
There is no need for all the messing about with flags, macros, and conditional compilation.
Just put the declarations into a header file;
eg display.h:
extern U8 picture[]; // NB: Array bounds are not specified in a declaration
and then include that header wherever the variable is needed and in the file in which it is defined;
eg
display.c:
#include "display.h"
U8 picture[8] = { etc, etc};

As I said before, including the header in the same file as the definition like this gives the compiler the chance to check that the extern declaration matches the actual definition - otherwise, the compiler will never know, and the linker may not spot it...

List of 11 messages in thread
TopicAuthorDate
KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table to a function            01/01/70 00:00      
RE: KEIL: How to send a table - James            01/01/70 00:00      
RE: KEIL: A-men Andy            01/01/70 00:00      
RE: KEIL: global variables            01/01/70 00:00      

Back to Subject List