Thomas wrote : > It is a little more complicated. Let's say I have > these codes: > data = 12345; > printf("%d",data); // LCD scr displays "12345" > data = 9; > printf("%d",data); // LCD scr displays: "92345" Hi. I'm not sure what C compiler you use, but does it accept the following : data = 12345; printf("%5d",data); data = 9; printf("%5d",data); That should provide with "padding" with space characters up to 5 characters total. Not sure if it will be left or right padding.... Regards Jan-Erik. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads