Does your QB64IDE toss a warning of variable unused in Status window when you paste the code that I have posted?
Yes, both before the exe is compiled and then when I left clicked the the little message made after F11 compile. I never took it for a glitch, I just assumed it was getting back to it's warning about variable m not being used.
I know this is not the topic of this tread but it seems we've stumbled upon a pretty good case to use GOTO instead of modern looping structures, at least in my opinion.
I can't believe I was thinking more and more about this little example of getting proper INPUT's from the user last night. But it is always a little nightmare to anticipate any crazy thing a user may try to INPUT to keep the code bullet-proof and this that I see this morning is perfect example!:
Again = -1
HelpScreen
PRINT "Center Point Horizon X (between 0 and ";
STR$(AnyMaxX
) + "): ":
INPUT xx
Again = -1
Again = 0
PRINT "Center Point Vertical Y (between 0 and " + STR$(AnyMaxY
) + "): ":
INPUT yy
Again = -1
Again = 0
INPUT "Center To Middle (radius larger than zero): ", r
Again = -1
Again = 0
PRINT "Choose how many coordinates you want here." Again = -1
What gets me about my fix and this, TempodiBasic's above, and Ken's original where this code comes from, all, have problem if one thing is messed up we have to start over again with the 20 questions. Never liked the 20 questions game with INPUT to begin with and explains why multiple choice or GUI has become so popular since computer automation and programming.
So what is better (if not using multiple choice, or slider, or GUI)?
Do each question in a loop either GOTO or modern form with check and feedback if incorrect :
inputxx:
input "Enter x, such that x >= 0 and x <= 800, (-1 to quit) ";xx
OK = -1 ' <<< edit move OK = true into loop
input "Enter x, such that x >= 0 and x <= 800, (-1 to quit) ";xx
if xx
< 0 or xx
> 800 then OK
= 0 :
print "x is not right, try again... "
Of course, still might need to work on scrolling screen or clear screen for each question.