I use scanf for input from a keyboard and echo in a display. It works good, but for the backspace-key I need to delete the last character from _getkey()-input. ? Thanks in advance. Dieter
This document explain how to clear the whole buffer. But I only want to delete the last character in then buffer. Annother way may be to decrement the buffer-pointer in the scanf-function. Is there a public variable to that pointer or to the buffer ?
scanf does not have an real input buffer, instead the input is process already at the time it is entered. Therefore it is impossible to use backspace to delete the last input character. You should use instead a getline function and the sscanf function as implemented in the MEASURE example. Therefore take a look to the file: Keil\C51\Examples\Measure\GetLine.C.