[Top][All Lists]

[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: Victor A. Wagner Jr.
Subject: Re: [avr-gcc-list] Type casting from 32 bit to 64 bit ... doesnt seem to work
Date: Sat, 11 Jun 2005 22:14:17 -0700

At 21:52 2005-06-11, intiha Ho gai 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 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.

we have no information about what the definitions of sumX and sumY are.
so the problem may be simple overflow.
we really need more information to be more help.

Thanks for all the help.


reply via email to

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