View Single Post
  #7   Spotlight this post!  
Unread 05-12-2004, 21:27
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Arrays on the PIC?

Quote:
Originally Posted by Mike Betts
Are you dynamically allocating storage or anything strange like that?
Hi Mike,
I also use multi-dimensional arrays without problems, however, my main programmer coded an algorithm Fall 2003 using a multi-dimensional array in ram to empirically develop some constant values. When he simply changed the declaration to rom after fixing his constants the code choked. No dynamic allocation of memory (especially since it was in rom ).

I don’t remember the details (it was almost a year ago), and don't think those details are germaine to poor scitobor here. When I debugged the problem I did change how his code used pointer arithmetic, but only because his particular application ran into an odd compiler bug. It generated incorrect assembly (no he wasn’t optimizing – I knew you guys reading this were thinking that). It’s probably gone from the latest version shipped with the KOP this year.

Hence the caution and suggestion that one might benefit from testing a simplified skeleton of an algorithm using rom multi-dimensional arrays. I consider that good practice for the students in any case.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 05-12-2004 at 21:31.