scanf conflicting characters remain in the input stream

hello, there's a little problem with the scanf-function. My program

...
 scanf("%u",&A);
...
 
expects a unsigned integer. But when someone hits a unwanted character, scanf terminates. Any conflicting character remain in the input stream. How to clear the scanf-input-stream? Is there a known workaround for ARM7 ADuC7026)? In C51 you just
CLR ?C?charloaded
RET
But how on ARM7? Thanks for advice :-)

More questions in this forum