Hi to all. Working in C with PIC24FJ128GA006. 3 buttons that work with LCD men=F9 I want too let the user put in a number, with range -500,0000 to +500,0000 i am trying this code: void LongBannerChangeField(char increment){ volatile int delayCount; float LNdata; if(_uLongBannerSetup){ ReadLONG(); LNdata =3D _long.data; if (_uLongBannerCurPos =3D=3D LN_BNR_POS_CENTINAIA){ if(increment) LNdata =3D (LNdata + 100.00); LONGSetIntervallo(LNdata); }//LN_BNR_POS_CENTINAIA = if (_uLongBannerCurPos =3D=3D LN_BNR_POS_DECINE){ if(increment) LNdata =3D (LNdata + 10.00); LONGSetIntervallo(LNdata); }//LN_BNR_POS_DECINE if (_uLongBannerCurPos =3D=3D LN_BNR_POS_UNITA){ if(increment) LNdata =3D (LNdata + 1.00); LONGSetIntervallo(LNdata); }//LN_BNR_POS_UNITA = if (_uLongBannerCurPos =3D=3D LN_BNR_POS_1000){ if(increment) LNdata =3D (LNdata + 0.1); LONGSetIntervallo(LNdata); }//LN_BNR_POS_1000 if (_uLongBannerCurPos =3D=3D LN_BNR_POS_0100){ if(increment) LNdata =3D (LNdata + 0.01); LONGSetIntervallo(LNdata); }//LN_BNR_POS_0100 if (_uLongBannerCurPos =3D=3D LN_BNR_POS_0010){ if(increment) LNdata =3D (LNdata + 0.001); LONGSetIntervallo(LNdata); }//LN_BNR_POS_0010 if (_uLongBannerCurPos =3D=3D LN_BNR_POS_0001){ if(increment) LNdata =3D (LNdata + 0.0001); LONGSetIntervallo(LNdata); }//LN_BNR_POS_0001 WriteLONG(); }//_uLongBannerSetup; }//LongBannerChangeField I would like that when a digit gets to 9 it returns to zero without = incrementing the digit just above. ?!? Any help? LONGSetIntervallo(LNdata); just looks if we are out of range Thanks Stefano -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist