<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>scanf - how to delete a char in the in-buffer ?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/15387/scanf---how-to-delete-a-char-in-the-in-buffer</link><description> 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 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: scanf - how to delete a char in the in-buffer ?</title><link>https://community.arm.com/thread/95201?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2002 08:36:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:82a744dc-fcdf-45dd-9077-52b1a0e5dfa5</guid><dc:creator>Keil  Support Intl.</dc:creator><description>&lt;p&gt;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.&lt;br /&gt;
&lt;br /&gt;
You should use instead a getline function and the sscanf function as implemented in the MEASURE example.  Therefore take a look to the file: &lt;b&gt;Keil\C51\Examples\Measure\GetLine.C&lt;/b&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanf - how to delete a char in the in-buffer ?</title><link>https://community.arm.com/thread/54762?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2002 08:23:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b92639e9-4d9d-4d5f-90dd-1904a14d9138</guid><dc:creator>Dieter Joenen</dc:creator><description>&lt;p&gt;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 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: scanf - how to delete a char in the in-buffer ?</title><link>https://community.arm.com/thread/39306?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2002 00:04:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b344da85-0997-4fd5-983c-e725339f2cb5</guid><dc:creator>Keil  Support Intl.</dc:creator><description>&lt;p&gt;The document under:&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/2017.htm"&gt;http://www.keil.com/support/docs/2017.htm&lt;/a&gt;&lt;br /&gt;
explains how to do that.&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>