[Tinyos-help] array initialization

Michael Schippling schip at santafe.edu
Thu Jul 24 09:05:44 PDT 2008


I think it's usually like this when declaring a "global":

	int a[] = { 1,2,3,4,5,6,7 }

If the variable already exists or is a local you need a for loop
or other explicit assignment for each element.

MS


milos rovcanin wrote:
> Ok,i would like to ask you one question: how to initialize an array???  
> I am using the GCC linux compiler.
>  
> if i do it like this: a[1,1,1,1,1,1,1,1]
>   compiler says " parse error before ',' "  i used to compile the same 
> program in Cygwin and there were no errors like this. Where is the problem? 
> Someone,please,help me!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


More information about the Tinyos-help mailing list