11-18-2025, 12:25 AM
@Steve
I must answer to your question
so I decided to add mouse input, while I was typing the code I choose to make a sub for clearing the mouse buffer.
When I was developing the mouse input into test SUB I need to get back the mouse input and boring to add other code (some few lines) I thought that in clearing mouse buffer loop I can get the input...it is already there, yeah it is in a loop, but no optimization of resources and time were in my mind and project.
So I apologize for my bad coding habit (no optimization of resource, no time optimization, no global and clear starting project) but I was stunned by the so fast flow of actions leading to a stucking mouse input .
WHY is better inner input loop than input at the end of the loop?
No reason except lazyness that brought me to the arising issue.
My learning here are
1 set better the project and then code
2 also if it seems increasing the time of coding, make it as better as you can, and avoid confounding code.
I must answer to your question
Quote:As a logic exercise, *YOU* explain to all the rest of us how the original code would be *any* better than just taking the value at the end of that loop. Run it through your mind however you want. View it from every angle. And then explain WHY you think that you need to get those values *inside* that WHILE loop and not after it's ran and did its thing?at the first round I coded only the keyboard input, but the demo seemed me too plain
so I decided to add mouse input, while I was typing the code I choose to make a sub for clearing the mouse buffer.
When I was developing the mouse input into test SUB I need to get back the mouse input and boring to add other code (some few lines) I thought that in clearing mouse buffer loop I can get the input...it is already there, yeah it is in a loop, but no optimization of resources and time were in my mind and project.
So I apologize for my bad coding habit (no optimization of resource, no time optimization, no global and clear starting project) but I was stunned by the so fast flow of actions leading to a stucking mouse input .
WHY is better inner input loop than input at the end of the loop?
No reason except lazyness that brought me to the arising issue.
My learning here are
1 set better the project and then code
2 also if it seems increasing the time of coding, make it as better as you can, and avoid confounding code.

