From: Johan K. <joh...@id...> - 2001-06-17 19:31:49
|
> > > static void > > > testIncrement(void) > > > { > > > volatile int i; > > > i = 0; > > > i--; > > > } > > > > > > static void (*const _tests[])(void) = { > > > testIncrement, > > > 0 > > > }; > > > > > > error *** Attempt to assign value to a constant variable > > > No, but what do you expect it to do. As far as I can see it, this is a > > constant array of pointers to functions that return voids. Because the array > > is constant, you can't assign values to it. > > It's not obvious, but this is a global array so I should be able to > initialise it. I thought I actually had something else checked in - like > a const array of void pointers because of sdcc balking at an array of > function pointers. Probably my fault. I bail out. This is Bernhard's expertise Johan |