Qbasicnews.com

Full Version: ISBN while wend loop help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i already finished the program but i can not put while wend loop to ask YES/NO to retry or n for finish. how can i do that. thanks for the help
This isn't using While...Wend..but here are two ways to do what you are asking for

Code:
'  ____
' /_\__\
'|_____| Sorry I just had to make a house for no apparent reason

INPUT "Retry? Y or N ", choice$
IF choice$ = "y" THEN GOTO retry
IF choice$ = "n" THEN END

or if you want it in a loop

Code:
DO
press$ = INKEY$
IF press$ = "y" then goto retry
IF press$ = "n" then END
LOOP

very simple stuff...and I really don't see a need for using WHILE/WEND...but if you need it to do that or you want more specific(after all, you didn't post this in the newbie forum) just ask.
you might want to change it to lcase$(choice$) = "y". It makes the if case insensitive
Code:
INPUT "Retry? Y or N ", choice$
choice$ = lcase$(choice$)
IF choice$ = "y" THEN GOTO retry
IF choice$ = "n" THEN END

Done Wink
Samorzi,
I'm curious why your subject begins with ISBN. Does it have anything to do with an ISBN book number, or is it some abbreviation like IMHO (in my humble opinion) that I haven't seen yet?
*****