[Tinyos-help] Assign value to an array NesC

nivedita datta sweetnivi88 at gmail.com
Sun Dec 1 12:50:26 PST 2013


Hi,

I am trying to initialize the values in an array by using the following
command:

*uint8_t i;*
*uint8_t in[16] =
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};*

*    for (i=0; i<10; i++) {*
*      in[i] = i; }*

However I am getting error message saying:

*In component `TestAESC':*
*TestAESC.nc:65: syntax error before `for'*
*TestAESC.nc:65: syntax error before `<'*
*TestAESC.nc:65: syntax error before `++'*

The error messages go away as soon as I remove the for loop. Please let me
know how to initialize the array.

Thanks in advance for your time & effort.

Regards,
Nivedita Datta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20131202/b64acf06/attachment.htm 


More information about the Tinyos-help mailing list