M
Michael
Thanks to everyone who responded on my last question. I have come
across something I don't understand, I had a good look through the FAQ
first, and I didn't find anything about it.
I have an array of global constants:
const unsigned long unit_id[8] = {
0x00323130,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
};
I want to initialise a static variable in a function using
'unit_id[0]'
{
static unsigned long shifter=unit_id[0];
This gives me an error 'non-address/-constant initializer'
I am using the Keil C51 compiler V7.10 for 8051 based processors.
across something I don't understand, I had a good look through the FAQ
first, and I didn't find anything about it.
I have an array of global constants:
const unsigned long unit_id[8] = {
0x00323130,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
};
I want to initialise a static variable in a function using
'unit_id[0]'
{
static unsigned long shifter=unit_id[0];
This gives me an error 'non-address/-constant initializer'
I am using the Keil C51 compiler V7.10 for 8051 based processors.