avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Type casting from 32 bit to 64 bit ... doesnt seem to


From: Dmitry K.
Subject: Re: [avr-gcc-list] Type casting from 32 bit to 64 bit ... doesnt seem to work
Date: Sun, 12 Jun 2005 16:06:17 +1100
User-agent: KMail/1.5

On Sunday 12 June 2005 15:52, you wrote:
> hmm, So any comment as to why it might be happening to me? I am sure
> there is something else that i am missing that affects this, but let
> me give yout the exact code that i use, that is giving me incorrect
> results so that you can help me more.
>
>
> typedef struct regTblEntry {
> int32_t x;
> int32_t  y;
> }TblEntry;
> TblEntry regTable[BEACONS_REQUIRED];
>
> for (i=0; i< BEACONS_REQUIRED; i++){
>
>       sumX +=  regTable[i].X;
>       sumY +=  regTable[i].Y;
>
>        printf( " %ld, %ld, \r\n ", regTable[i].X,regTable[i].Y);
>
>       }
>
>
> At the end when I print the sumX and sumY values, the are incorrect.

Are sumX and sumY 64-bits, as was mentioned in first mail?
Avr-libc's printf does not work with 64-bits values.

Dmitry.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]