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

18F252, char[20][16], char[20][80]

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







18F252, char[20][16], char[20][80]
PostPosted: Thu Mar 27, 2003 11:35 am     Reply with quote

I'd like to have some arrays of strings - ie a 2D char array. I get impression this can't be done, anybody know a nice way to get around this?

Cheers,
Mark
___________________________
This message was ported from CCS's old forum
Original Post ID: 13151
Tomi
Guest







Re: 18F252, char[20][16], char[20][80]
PostPosted: Thu Mar 27, 2003 12:25 pm     Reply with quote

What version?
3.148 does it fine, e.g.:
char mystrings[20][16];
......
mystrings[MainMenu][SubMenu] = lastKey;


:=I'd like to have some arrays of strings - ie a 2D char array. I get impression this can't be done, anybody know a nice way to get around this?
:=
:=Cheers,
:=Mark
___________________________
This message was ported from CCS's old forum
Original Post ID: 13153
MarkP
Guest







Re: 18F252, char[20][16], char[20][80]
PostPosted: Mon Apr 07, 2003 12:48 pm     Reply with quote

<font face="Courier New" size=-1>:=What version?
I ran ccsc.exe +V and it gave me a file not found error :-S I transplanted the install from another machine that had died, so I guess there's an install problem there or a conflict with the PCM that was prevoiusly installed on it - though it works fine otheriwse!

:=3.148 does it fine, e.g.:
:=char mystrings[20][16];
:=......
:=mystrings[MainMenu][SubMenu] = lastKey;
:=
That's annoying, I do:

char units_array[20][17];
char data_array[20][80];

and I get a subscript out of range error.

Thanks for your help</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 13469
Tomi
Guest







Re: 18F252, char[20][16], char[20][80]
PostPosted: Wed Apr 09, 2003 4:58 am     Reply with quote

:=char units_array[20][17];
:=char data_array[20][80];
:=
:=and I get a subscript out of range error.

20 * 80 = 1600 bytes. Check 18F252 datasheet for RAM size Smile
___________________________
This message was ported from CCS's old forum
Original Post ID: 13530
MarkP
Guest







Re: 18F252, char[20][16], char[20][80]
PostPosted: Mon Apr 14, 2003 8:00 am     Reply with quote

:=:=char units_array[20][17];
:=:=char data_array[20][80];
:=:=
:=:=and I get a subscript out of range error.
:=
:=20 * 80 = 1600 bytes. Check 18F252 datasheet for RAM size <img src="http://www.ccsinfo.com/pix/forum/smile.gif" border="0">

Damn, 1536. So close ;) That'll teach me to get complacent.

Thanks anyway.
___________________________
This message was ported from CCS's old forum
Original Post ID: 13655
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