|
Re: Arrays on the PIC?
Quote:
|
Originally Posted by Mark McLeod
Just wanted to mention that while single dimension arrays work as expected, there are some oddities in the mcc18 implementation of C with multi-dimensional arrays, e.g., char abc[10,5]. Especially, differences between how a multi-dimensional array behaves in rom vs. in ram space when passed by address to another routine. If you plan on doing this I suggest experimenting first with a test program.
|
Mark,
I used multidimensional arrays in ROM space with no issues. I address the array by pointer reference and index from there.
I don't have any arrays in RAM space so I can't speak to that... Are you dynamically allocating storage or anything strange like that?
__________________
Mike Betts
Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013
As easy as 355/113...
|