Hi,
This is tested in Visual C++ in the Windows. but I don't know it in tinyos
compiler.
Only refer to your work...

char sql[100];

__int64 var1=0x12345678ABCDABCD;
 sprintf(sql,"%I64x",var1);   //not L. Upper case of i[ai]...
sprintf(sql,"%I64d",var1);

Best regards,
K.S.Lee

2009/2/5 BAI LI <libai0...@gmail.com>

> 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
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to