CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Problem segment 16f877

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
micman
Guest







Problem segment 16f877
PostPosted: Tue Sep 09, 2003 8:35 am     Reply with quote

I have,
with pic 16F877,

char CONST table_ascii[91][5]={};

The compiler error: "subscript out of range"!!!! WHY? What resolve it?

BUT with pic 18F452 the compiler ok!

Thank
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 09, 2003 8:54 am     Reply with quote

Subscript out of range
A subscript to a RAM array must be at least 1 and not more than 128 elements. Note that large arrays might not fit in a bank. ROM arrays may not occupy more than 256 locations.


You could do something like this:

char CONST table_ascii0[91]={};
char CONST table_ascii1[91]={};
char CONST table_ascii2[91]={};
char CONST table_ascii3[91]={};
char CONST table_ascii4[91]={};
micman
Guest







PostPosted: Tue Sep 09, 2003 9:14 am     Reply with quote

Thanks
Guest








PostPosted: Tue Sep 09, 2003 9:41 am     Reply with quote

micman wrote:
Thanks

And (of course), worth saying that this limit doesn't apply to the 18F family (which is why it worked with a 18F452...

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group