| ??? 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 declarationand 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... |
| Topic | Author | Date |
| 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 |



