View Single Post
  #8   Spotlight this post!  
Unread 17-02-2007, 01:22
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: const array - 'auto' compile error ?

One way that works with easyC Pro to use the new C source file feature that was just added this year.

Create a source file (go into the project tab, right click "Source Files" and create a file). In there put the definition of the array with the initialization:
Code:
rom const unsigned char L3[2] = {000,001};
Then edit the file UserInclude.h and insert an extern declaration for the array like this:
Code:
extern rom const unsigned char L3[];
Now you can use references to the L3 array in assignment statements or other expressions throughout your block-based easyC program. The only problem is that the array will not show up in the list of variables when you are creating expressions.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute