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

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

[avr-gcc-list] Help please: unsigned long + = unsigned char * unsigned c


From: ny88
Subject: [avr-gcc-list] Help please: unsigned long + = unsigned char * unsigned char
Date: Tue, 22 Aug 2006 19:06:12 +0800 (CST)

Dear,

Help, please! The value of c is not what we expect. It should be 50001, but 4294951761!

Condition: mcu=atmega16 WinAVR20060421

#include

int main(void){

volatile unsigned char a,b;

volatile unsigned long c;

a=250;

b=200;

c=1;

c+=a*b;

return 0;

}

B.R.

Niu Yong



超大U盘免费等你拿
*用搜狗拼音写邮件,体验更流畅的中文输入>>

reply via email to

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