c++ - Why codevision avr ignores some statements in "if" operator? -
now works should. well,certanly mistake,but without of questions itwould difficult rid it.
if ((key==11)^(key==13)^(key==16)^(key==17)) //this // dirty hack style string needed fix { switch (key) { case 11: { mode=0x01; break; } //plus case 13: { mode=0x02; break; } //minus case 16: { mode=0x03; break; } //multiply case 17: { mode=0x04; break; } //divide } if (mode) { buffer=atof(display); firstop=1; first=1; redraw=1; //and delete goto } }
you never reset mode, pressing once keep doing selected mode other key.
you define no default statement in switch statement
try play compiler optimization switches. if solves problem, volatile
problem mode gets optimized out
Comments
Post a Comment