DPRG
DPRG List  



[DPRG] Pointers to values in Program Space in WINAVR

Subject: [DPRG] Pointers to values in Program Space in WINAVR
From: Kipton Moravec kip at kdream.com
Date: Thu Sep 9 17:52:47 CDT 2004

Sorry it was either an unsigned char or unsigned int.  I do not think I 
tried an int.

No floats or longs in this program.


At 03:44 PM 9/9/04, you wrote:
>Thats a compiler bug,
>
>>temp = outstates[1];  // works
>>i = 1;
>>temp = outstates[i]; // does not work.
>
>You don't show the declaration of i however I'm assuming its
>         int     i;
>
>Somewhere up above? If I were a float, or a long, this might be problematic.
>
>--Chuck

I ended up using:

temp = pgm_read_byte_near(outstates+i);

This works.

Kip





More information about the DPRG mailing list