Hi Martin

I tried that, but it doesn't go well! I forgot to say it.

Thanks!

> Date: Wed, 2 Dec 2009 20:34:55 +0000
> From: [email protected]
> To: [email protected]
> Subject: Re: [Tinyos-help] Size of array
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi David,
> 
> just a quick guess.
> Just walk with a loop through the array and count the elements.
> 
> So to say
> 
> uint_8 counter = 0;
> while( array[i+1] != null )
> {
>     counter++;
>     i++;
> }
> 
> Maybe this seems a little bit strange, but I think, nesC (or C) does
> not have something like array.length();
> 
> Someone please correct me, if this is wrong.
> 
> Just a guess ;)
> 
> Best,
> Martin
> 
> David Rodenas Herráiz wrote:
> > <!-- .hmmessage P { margin:0px; padding:0px } body.hmmessage {
> > font-size: 10pt; font-family:Verdana } --> Hi all
> >
> > How can I get the number of elements of an array?
> >
> > For example, if you have a pointer to an array of 200 elements, get
> > this number.
> >
> > You can't do this with sizeof. I've also tried with
> > sizeof(array)/sizeof(array[0]) but I don't get what I want.
> >
> > Regards
> >
> > David
> >
> >
> > ----------------------------------------------------------------------
> > 49 habitantes, 49 expertos en Windows 7. Así es Sietes, ¡Visítalo!
> > <http://www.sietesunpueblodeexpertos.com/>
> >
> > ----------------------------------------------------------------------
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAksWz2sACgkQa1gn+vovozP0LgCeLLlwaPU2bQA1ORbpojSzzS3o
> INMAoIH5VvC9wE/HiyRh9M8WfUKxCx71
> =+D3h
> -----END PGP SIGNATURE-----
> 
                                          
49 habitantes, 49 expertos en Windows 7. Así es Sietes,  ¡Visítalo!             
                          
_________________________________________________________________

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to