Re: [Tinyos-help] help needed on uint64_t type

2009-02-06 Thread BAI LI
Hi, Thanks for your solution. It is a method. But when you use UNION structure, every time you only can store one varialbe in that UNION structure. You have to overwrite that memory address Which made it a bit inconvenience. BUt it is a good method when you break a 64 bits message into two 32

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread BAI LI
Hi All, I just tested it. I guess prinf couldn't print 64 bits variables but low 32 btis instead. By moving the variable 32 bits left, it can print the high 32 bits. such as a32. it made the debugging work a bit harder but still ok. Anyone kowns how to print the whole variable instead breaking

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread BAI LI
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.gur...@online.uawrote: Bai, you should explicit write ULL at the end of the

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread Eric Decker
I don't think the tinyos printf handles 64 bit objects. eric On Thu, Feb 5, 2009 at 1:32 PM, BAI LI libai0...@gmail.com wrote: Hi All, I just tested it. I guess prinf couldn't print 64 bits variables but low 32 btis instead. By moving the variable 32 bits left, it can print the high 32

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread Andrey Gursky
Hi Bai! I've tried it only in pure C (not nesC) with %lld and %llx.Regards,Andrey 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

Re: [Tinyos-help] help needed on uint64_t type

2009-02-05 Thread ivi610
From: BAI LI libai0...@gmail.com Subject: Re: [Tinyos-help] help needed on uint64_t type To: kiseop Lee aco...@gmail.com Cc: Tinyos-Help tinyos-help@millennium.berkeley.edu Message-ID: 1254364b0902051332q63b3d89au924f312c9f4a2...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi All

[Tinyos-help] help needed on uint64_t type

2009-02-04 Thread BAI LI
Hi All, I have defined a uint64_t type variable as follows: uint64_t a; a=0x; printf(a= %lld /n,a); printf(a= %llx /n,a); the result displayed as follows: a= -1 a= The compilation didn't show any error. What is the problem? Does printf support to display the uint64_t

Re: [Tinyos-help] help needed on uint64_t type

2009-02-04 Thread kiseop Lee
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