[Tinyos-help] List in nesc
David
wizzardx at gmail.com
Mon May 12 03:30:37 PDT 2008
On Mon, May 12, 2008 at 10:42 AM, Paolo <pl78 at katamail.com> wrote:
> Hello,
> a list of items in nesc is equal to a list of element in C ?
>
Strictly speaking there is no 'list' type in C or nesc. Regular arrays
work the same in C and nesc however.
Just declare and use them like you would in C. Here's an example
implementation module (I haven't tested it):
<CODE>
module TestModuleP {
uses interface Boot;
}
implementation {
int test_array[100];
event Boot.booted() {
int i;
for (i=0; i<100; i++) {
test_array[i] = i;
}
}
}
</CODE>
David.
More information about the Tinyos-help
mailing list