u8 RAM[10]; u32 data;
RAM[0]=3;
RAM[1]=4;
RAM[2]=5;
RAM[3]=6;
RAM[4]=7;
RAM[5]=8;
data = RAM[0]*100000;
data += RAM[1]*10000;
data += RAM[2]*1000;
data += RAM[3]*100;
data += RAM[4]*10;
data += RAM[5];
设想data最后等于 345678,但实际有时得不到正确结果,和RAM中的数字大小有关,下午下班发答案 |