[Tinyos-help] help needed on uint64_t type

BAI LI libai0915 at gmail.com
Thu Feb 5 13:40:06 PST 2009


Hi Andrey,

I just tested it. it didn't work though. What the flag you used in printf?
Is that llx? Right? It still displayed low 32 bits. Confusing.

Regards,
Bai

On Fri, Feb 6, 2009 at 3:27 AM, Andrey Gursky <andrey.gursky at online.ua>wrote:

> Bai, you should explicit write ULL at the end of the such big number
> (tested in C):
> a=0x0000FFFFFFFFFFFFULL;
>
> Best wishes,
> Andrey
>
>  Hi All,
>
> I have defined a uint64_t type variable as follows:
>
> uint64_t a;
> a=0x0000FFFFFFFFFFFF;
> printf("a= %lld /n",a);
> printf("a= %llx /n",a);
>
> the result displayed as follows:
>
> a= -1
> a= ffffffff
>
> The compilation didn't show any error. What is the problem? Does printf
> support to display the uint64_t type? Any help would be appreciated!
>
> Regards,
> Bai
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090206/e90e54dc/attachment.htm 


More information about the Tinyos-help mailing list