Declaration of an array
Posted: Mon Nov 08, 2010 7:17 pm
Hi everyone,
I just wanted to know the difference between a global array and local array on microcontrollers.
I tried to create an array of 82 bytes within the main, but the compiler (mikroC compiler, not tried on flowcode) tells me that there isn't enough memory, but creating that same array as global (outside main) does compile perfectly.
I'm just curious about why it compiles when it's a global array and why it doesn't when it's a local ?
Thanks,
Nicolas Lopez F.
I just wanted to know the difference between a global array and local array on microcontrollers.
I tried to create an array of 82 bytes within the main, but the compiler (mikroC compiler, not tried on flowcode) tells me that there isn't enough memory, but creating that same array as global (outside main) does compile perfectly.
I'm just curious about why it compiles when it's a global array and why it doesn't when it's a local ?
Thanks,
Nicolas Lopez F.