Size of array : Problem

General discussion on RSC-4x mikroC.
Post Reply
Author
Message
massebob
Posts: 5
Joined: 12 Mar 2007 10:41

Size of array : Problem

#1 Post by massebob » 11 May 2007 09:21

I want to declare an array of 1000 chars but I have an error : Out of range. How can I declare my array given that the fact I can't use : char array[1000];
Thanks

cowcow
Posts: 7
Joined: 23 Jan 2007 03:43

#2 Post by cowcow » 11 May 2007 18:50

I think it is because the index of the array is limited to 0 to 255.
It is due to the index is a 8bits number.
one way you can create a array longer than 255 is Multi-dimensional Arrays.
for example: ary[5][200].

kido
Posts: 5
Joined: 28 Mar 2008 08:44

Re: Size of array : Problem

#3 Post by kido » 28 Mar 2008 08:50

massebob wrote:I want to declare an array of 1000 chars but I have an error : Out of range. How can I declare my array given that the fact I can't use : char array[1000];
Thanks
I think the RSC4128 didn't has that much RAM for you to declare. You may consider using RAMY

Post Reply

Return to “RSC-4x mikroC General”