hello, there's a little problem with the scanf-function. My program
... scanf("%u",&A); ...
CLR ?C?charloaded RET
the Keil C51 does have an input buffer that needs to be cleared. That's an over-interpretaion of that support note you found. Yes, it does have a buffer, which you can clear if you want to. But by no means does that imply it needs to be cleared. In a nutshell: if you feel a need to clear stdin, you've quite invariably done something wrong before, i.e. you're now trying to fix symptoms instead of treating the disease. Basically, scanf() directly into any other format but strings is hardly ever an appropriate means of reading input from a non-deterministic source, e.g. a human operator. I.e. if you don't know for sure that the input will exactly match your scanf() format, every time, then scanf() is the wrong function to use. As I already indicated, error-prone input pretty much has to be read as a string, which you then sscanf().
Hans,
That's an over-interpretaion of that support note you found. Yes, it does have a buffer, which you can clear if you want to. But by no means does that imply it needs to be cleared