--------------Boundary-00=_0L69QL80000000000000 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Try using a string, eg: "1024". And convert to a long only when the inpu= t is done.=0D =0D You could clear one digit from your long using:=0D =0D long v;=0D v -=3D ((v/pow(10,n))%10)*pow(10,n); // Makes Nth digit zero;=0D =0D But all this calculations would take some time and space.=0D =0D Lucas Hartmann.=0D =0D -------Mensagem original-------=0D =0D De: pic microcontroller discussion list=0D Data: Wednesday, November 12, 2003 17:02:20=0D Para: PICLIST@MITVMA.MIT.EDU=0D Assunto: [PIC:] LCD input and the 'long' variable=0D =0D Hi all,=0D I have a routine where the user can enter data and show the data on an lc= d.=0D Most of it works ok, but in the routine, but when it comes to the user=0D entering a backspace to alter the information on the screen it all falls=0D apart. The re-entered data gets added to the LONG and I can't find out a=0D way of 'detecting' what decimal digit is in a certain place.=0D =0D e.g. lets say the LONG is decimal 1024 and the user wants to change the '= 2'=0D to a '3'. Accounting for powers of 10, my routine adds the 2 to the 3=0D instead of replacing it, so it becomes 1054.=0D =0D Is there any way to null that decimal character in the long integer befor= e=0D you add the 3 (or 30 in this case)?=0D =0D Brian.=0D =0D --=0D http://www.piclist.com hint: To leave the PICList=0D mailto:piclist-unsubscribe-request@mitvma.mit.edu=0D =0D =2E -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu --------------Boundary-00=_0L69QL80000000000000 Content-Type: image/gif; name="IMSTP.gif" Content-Transfer-Encoding: base64 Content-ID: R0lGODlhFAAPALMIAP9gAM9gAM8vAM9gL/+QL5AvAGAvAP9gL////wAAAAAAAAAAAAAAAAAAAAAA AAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJFAAIACwAAAAAFAAPAAAEVRDJSaudJuudrxlEKI6B URlCUYyjKpgYAKSgOBSCDEuGDKgrAtC3Q/R+hkPJEDgYCjpKr5A8WK9OaPFZwHoPqm3366VKyeRt E30tVVRscMHDqV/u+AgAIfkEBWQACAAsAAAAABQADwAABBIQyUmrvTjrzbv/YCiOZGmeaAQAIfkE CRQACAAsAgABABAADQAABEoQIUOrpXIOwrsPxiQUheeRAgUA49YNhbCqK1kS9grQhXGAhsDBUJgZ AL2Dcqkk7ogFpvRAokSn0p4PO6UIuUsQggSmFjKXdAgRAQAh+QQFCgAIACwAAAAAFAAPAAAEEhDJ Sau9OOvNu/9gKI5kaZ5oBAAh+QQJFAAIACwCAAEAEAANAAAEShAhQ6ulcg7Cuw/GJBSF55ECBQDj 1g2FsKorWRL2CtCFcYCGwMFQmBkAvYNyqSTuiAWm9ECiRKfSng87pQi5SxCCBKYWMpd0CBEBACH5 BAVkAAgALAAAAAAUAA8AAAQSEMlJq7046827/2AojmRpnmgEADs= --------------Boundary-00=_0L69QL80000000000000--